Commit Graph

69 Commits

Author SHA1 Message Date
UltraNix
7965ea5aaa fix(Core/Movement): set proper flying animations for creatures with INHABIT_GROUND (#7589)
- Closes #7579
2021-09-01 12:15:01 +02:00
Silker
9d81f3525f fix(Core/Creature): Disable periodic call for assistance on minions from instances (#7650) 2021-08-31 08:03:09 -06:00
UltraNix
f23d42c0dd fix(Core/Entities): mobs called for help should check if can see and detect the enemy (#7493)
- Updates #7125
2021-08-26 10:38:27 +02:00
UltraNix
a8c0a2cc89 fix(Core/Movement): (#7008)
- Get zone/area IDs from vmap data in the liquid update
- Add new method Map::getFullVMapDataForPosition to get area info and liquid info in a single vmap lookup
- Adjust GetZoneId/GetAreaId on WorldObject to always return these cached fields.
- Clean up liquid state handling on Unit and Player
- Implemented getting area id from gameobject spawns.
- Removed old core related to getting movement flags dependent on environment.
- Movement flags are now processed more precisely and dynamically.

Original source: TrinityCore.

- Closes #5086
- Updates #2208.
2021-08-25 12:41:20 +02:00
UltraNix
1b7d3708a6 fix(Core/Loot): (#7452)
- Players that did not participate in killing dungeon boss are not eligible to get loot.
- Players that are too far away from the looted object are not eligible to get loot.
- Players that released spirit and were outside the dungeon when the loot has been released are eligible to get loot.
- Players that have pending bind are not eligible to get loot.
- Properly get loot recipient for some chests in dungeons.
- All above fixes should work in any loot mode (group loot, master loot, etc.)
- Closes #2104.
2021-08-24 23:48:22 +02:00
jestermaniac
5f6780532f fix(Core/Unit): adds in formation not attacking when leader killed (#7412)
Co-authored-by: John Smith <mostdefinitelyanagger@outlook.com>
2021-08-22 13:32:27 +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
9ac6fddcae feat(Core/Database): port TrinityCore database API (#5611) 2021-06-22 06:21:07 +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
Cláudio Costa
07861d0548 fix(Core/DB): Brewspewer hardcoded conditions (#6301) 2021-06-18 17:04:41 +02:00
Francesco Borzì
466cdb68d6 refactor(Core): code cleanup (part 2) (#6374) 2021-06-16 20:40:42 +02:00
Kitzunu
7152ddc82c refactor(Core/Grids): Ported cmangos/mangos-wotlk@ea99457 (#6113)
* refactor(Core/Grids): Ported cmangos/mangos-wotlk@ea99457

(cherry picked from commit d6201e5dbb)
Co-Authored-By: Shauren <shauren.trinity@gmail.com>
Co-Authored-By: SilverIce <slifeleaf@gmail.com>

* Update CellImpl.h

* w

* more more brackets

* ew

* fix build
2021-06-03 05:27:51 +02:00
Kitzunu
897a02bb75 refactor(Core/Misc): acore to Acore (#6043) 2021-05-31 14:21:54 +02:00
Chero
2ae84e2faf fix(Core/Creature): Creatures will periodically call for assistance. (#5065) 2021-05-27 13:42:48 +02:00
Raelorasz
e5582b3443 fix(Core/Creature): Fix kill credit for some mobs after UpdateEntry (#5746)
Co-authored-by: Yehonal <yehonal.azeroth@gmail.com
2021-05-11 11:11:54 -06:00
Kitzunu
e29acf44d0 feat(Core/Creature): Create & use CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH (#5360)
Co-Authored-By: offl <11556157+offl@users.noreply.github.com>

Co-authored-by: offl <11556157+offl@users.noreply.github.com>
2021-04-30 14:01:36 +02:00
Kitzunu
5954d9c739 refactor(Core/Misc): Define & Rename Attributes (#5311) 2021-04-28 14:55:24 +02:00
UltraNix
f4c226423d feat(Core/Misc): implement ObjectGuid class (port from TC) (#4885) 2021-04-25 22:18:03 +02:00
v.tihomirov
620eb8e9f3 fix(DB): Scholomance Occultists behavior (#5314) 2021-04-25 21:02:52 +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
Kitzunu
33aeadf8b6 refactor(Core/Misc): Define & Rename Attributes and flags (#5193) 2021-04-15 14:16:39 +02:00
Footman
c32cd06a78 fix(Core/Movement): fix multiple creature movement issues (#5097) 2021-04-09 20:56:19 +02:00
UltraNix
fdc29c7a02 feat(Core/Creatures): extend mob leash mechanic assist in-combat creatures (#4897) 2021-04-05 15:35:29 +02:00
UltraNix
9ca4a23ef3 fix(Core/Creatures): Fixed unitialized varibale implemented in 728d018. (#5042)
- Closes #5030

Co-authored-by: UltraNix <ultranix@gmail.com>
2021-03-28 22:29:50 +02:00
Wojciech Nosal
e06d30e686 fix(Core/Creature): Respawning mobs missing aggro "grace period" (#4893) 2021-03-21 15:19:35 +01:00
UltraNix
6c7cc1690f fix(Core/Creatures): Fixed displaying trainer npcflags that are not valid to player. (#4848) 2021-03-21 15:18:41 +01:00
Kitzunu
9f354db7be feat(Core/Creature): Implement c_t_r & c_t_s (#4359) 2021-03-21 15:15:59 +01:00
Hacki95
2031e55ec7 fix(DB/Core) Fix the CLS damage system and update creature_classlevelstats (#4749)
* Fix the CLS dmg system

Thanks to TC: ccfa82e7d5
2021-03-19 17:26:30 -06: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
Kargatum
dbefa17a53 feat(Core/Config): rework config and delete ACE inherited (#4608) 2021-02-28 14:37:03 +01:00
Kitzunu
dbc0ff6554 refactor(Core): sort #includes alphabetically (#4579) 2021-02-24 22:34:42 +01:00
Kitzunu
812a744371 fix(Core/SAI): Do not reset HP with SMART_ACTION_UPDATE_ENTRY (#4486)
Co-Authored-By: Wyrserth <43747507+Wyrserth@users.noreply.github.com>
2021-02-13 14:53:44 -05:00
Footman
695a7402ad fix(Core): creature movement bugs (#4544)
- fix UpdateEnvironmentIfNeeded was changing flying creature status all the time. closes: #4447
- fix hovering state was causing bugs at #4466
- add animation state priority: fly > hover > ground

Co-authored-by: Wotex <fm@gmail.com>
Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
Co-authored-by: Patrick Lewis <pat@lo5t.com>
2021-02-12 11:42:41 +01:00
Footman
522eb9a7e4 fix(Core/Pathfinding): Creatures regen health, spells LOD (#4509) 2021-02-10 00:37:05 +01:00
Kitzunu
6e1fb0d525 feat(Core/Creature): implement c_t->spell_school_immune_mask (#4358)
* feat(Core/Creature): implement spell_school_immune_mask

* ae878e18ef

Co-Authored-By: Wyreth <32145860+Wyreth@users.noreply.github.com>

* Import from TC

* just capitalize sql keywords

* Update rev_1611769264588956600.sql

Co-authored-by: Wyreth <32145860+Wyreth@users.noreply.github.com>
2021-02-03 03:44:09 +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
Kitzunu
582a211ccd fix(Core/Creature): Move CREATURE_FLAG_EXTRA_IMMUNITY_KNOCKBACK (#4232) 2021-01-25 21:50:23 +01:00
Kitzunu
eddde2198c fix(Core/Creature): Implement INHABIT_ROOT (#4141) 2021-01-18 12:22:33 +01:00
Stefano Borzì
df600f9946 fix(Core/CreatureAI): revert NPC repositioning and path system (temporarily) (#4274) 2021-01-14 19:17:34 +01:00
Kargatum
ea93a5c1a1 feat(CI/Codestyle): added codestyle check (#3668) 2021-01-09 11:59:50 +01:00
Kitzunu
71b9124f69 fix(Core/Creature): Implement CREATURE_FLAG_EXTRA_GHOST_VISIBILITY (#4129) 2021-01-04 22:53:07 +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
Stefano Borzì
4cca286a4d fix(Core/Creature): dead creatures spawn position on respawn (#3382) 2020-10-09 11:18:01 +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
Kitzunu
8a1eab2c23 fix(Core/Creature): Use proper name for wander distance (#2858)
* Change from spawndist to wander_distance

Co-Authored-By: ratkosrb <ratkosrb@users.noreply.github.com>

* fix sql error

Co-Authored-By: ratkosrb <ratkosrb@users.noreply.github.com>

* Let's see if this fixes eluna :)

* Revert "Let's see if this fixes eluna :)"

This reverts commit be675bf83fc6a02f3347ea76408152d623d374bf.

* fix indent

* Revert "fix indent"

This reverts commit f4cb3d2d9fa908445d342b6f2e6dda9d52fd4665.

* Revert "Revert "fix indent""

This reverts commit 48527cfd2f9031f95bdf6e0d7b90111a3c0dc0f2.

Co-authored-by: ratkosrb <ratkosrb@users.noreply.github.com>
2020-04-11 11:20:02 +02:00
Stoabrogga
ed243d6911 feat(Core/Config): Parameter to set all creatures with WP movement active (#2615) 2020-02-23 14:08:42 +01:00
Kaev
2fa9f5c249 fix(Core): potential crashes/bugs reported by static analysis #2 (#2622) 2020-02-03 07:52:27 +01:00