Commit Graph
1138 Commits
Author SHA1 Message Date
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
Roc13x ac6604fba7 Core/Creature: Refactor vendor item code (#167)
* Fix loading referenced vendor items
* Refactored vendor item storage
2020-08-06 01:43:39 +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 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
Ovahlord 64c4b4f529 Core/Misc: converted quest, creature and quest query packets to packet class and ported query data caching from 335 branch 2020-07-28 21:34:12 +02:00
Ovahlord a4a8f9397a Scripts/Commands: added missing string enum entry for CREATURE_FLAG_EXTRA_NO_COMBAT when using npc info command 2020-07-25 13:31:31 +02:00
Treeston c7c4f267c4 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. 2020-07-22 19:14:52 +02:00
Ovahlord de6a514ec5 Core/Misc: fixed build 2020-07-22 18:35:41 +02:00
Treeston a16d691dd8 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.
# Conflicts:
#	src/server/game/Combat/ThreatManager.cpp
#	src/server/game/Entities/Creature/Creature.cpp
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Entities/Unit/Unit.h
2020-07-22 18:05:06 +02:00
Treeston 31f3cb203b Core/Threat: My dictionary informs me that "fixtate" is not, in fact, a word. Corrected to "fixate".
fd33b1c follow-up
2020-07-22 17:33:27 +02:00
Treeston 93864a29c0 Core/Threat: Re-add fixtate system. I am being told Netherspite needs it. 2020-07-22 17:33:17 +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 b708144ca9 Core/Threat: Custom ThreatListIterator that transparently iterates over the backing map (instead of using heap iterators) when working with the unsorted threat list. This greatly reduces the range of actions that can cause iterator invalidation.
Also some minor adjustments to .debug threat, which no longer hides certain invalid states from view.
2020-07-22 17:20:02 +02:00
Treeston 56773ed7f3 nopch fix 2020-07-22 17:19:03 +02:00
Treeston 34ed4c5923 nopch fix
# Conflicts:
#	src/server/scripts/Commands/cs_debug.cpp
2020-07-22 17:06:48 +02:00
Treeston 635371e5f8 missing return 2020-07-22 17:06:24 +02:00
Treeston cbec08f2b5 Scripts/Commands: New command: .debug threatinfo
# Conflicts:
#	sql/base/auth_database.sql
#	sql/old/4.3.4/auth/19_2017_06_18/2018_01_09_00_auth.sql
#	sql/old/4.3.4/world/23_2017_11_15/2018_01_09_00_world.sql
#	src/server/game/Accounts/RBAC.h
#	src/server/game/Combat/ThreatManager.h
2020-07-22 17:02:48 +02:00
Treeston aa9f8ef96b Revert "Scripts/Commands: Allow to use .tele in combat only to GMs"
This reverts commit 3ae5b72075925f896c53603c26b2aa0dd7708fbf - see discussion on commit.
2020-07-22 16:58:32 +02:00
jackpoz 936d88c2ca Scripts/Commands: Allow to use .tele in combat only to GMs
Allow to use .tele in combat only to players who can be GMs (even if they have .gm off)
2020-07-22 16:58:09 +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 c1237c788b Core/Map: Fix a crash that could happen if a player moved very far away from a creature they were in combat with. Closes #21177. 2020-07-22 16:52:02 +02:00
Treeston 4fd7d9aa00 Core/Misc: A variety of clean-up changes, mostly following up on 532ab1c to fix legacy bugs exposed by it:
- Triggers can no longer have a threat list (this may expose some ugliness in old legacy scripts)
- Threat entries are forced to OFFLINE if the AI refuses to attack the target
- Clean up passive creature evade behavior to be more consistent
- Fix a months old issue in spawn group management that would cause "Inactive" to incorrectly show in .list respawns for system groups outside of map 0
- Valithria script cleanups, remove old hacks and make it work with the new system. Closes #21174.
- Some strings cleanup

# Conflicts:
#	sql/old/4.3.4/world/23_2017_11_15/2018_01_04_00_world.sql
#	src/server/scripts/Northrend/IcecrownCitadel/boss_valithria_dreamwalker.cpp
2020-07-22 16:50:54 +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
Treeston e4ced70a31 Core/Misc: random refactors 2020-07-22 14:55:48 +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
Giacomo Pozzoni cbb0fe41de Core/Misc: Replace boost::shared_mutex with std::shared_mutex (#24328)
* Core/Misc: Replace boost::shared_mutex with std::shared_mutex

* Remove std forward declarations
# Conflicts:
#	src/server/game/Loot/LootItemStorage.h
2020-07-18 22:38:50 +02:00
Ovahlord d46fb93657 Core/Pools: ported pooling updates from 335 branch 2020-07-13 11:17:19 +02:00
Ovahlord b30f90cfb0 Scripts/Commands: fixed a typo 2020-07-07 02:39:07 +02:00
Ovahlord d077c92011 Core/Datastores: ported locale related datastore updates in order to load storage locales properly when set in config 2020-07-07 02:39:07 +02:00
Ovah b09d6e2330 Core/Movement: reimplement follow movement (#124) 2020-06-26 21:22:21 +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
Ovahlord 655bcaeecd Scripts/Commands: gameobjects spawned via .gameobject add command will now spawn with the orientation of the spawning player instead of always using the default QuaternionData values
closes #101
2020-06-01 15:18:18 +02:00
Shauren bc57ecd3bd Core/Commands: Fixed .npc add overwriting existing spawns when used on transports 2020-05-16 13:47:43 +02:00
Giacomo Pozzoni e3bab35d5e Core/MMAPs: Adjust walkable climb and fix a lot of mmap raycast issues (#24539)
* Core/MMAPs: Adjust walkable climb

Adjust walkable climb as recast using walkableClimb also to find the poly from a position, giving priority to polys that are below the position but closer than walkableClimb.

* Temporarily disable static collision (the whole check should be removed)

* Core/Spells: removed deprecated mmap path check for TARGET_DEST_CASTER_FRONT_LEAP

* Core/Objects: allow flying units to use the helper as well (flying units casting radius based spells)

* Code refactor

* Handle raycasts that end in a point with no height in the mmap mesh as PATHFIND_NOPATH

* Walk back a bit from raycast hitpoints as sometime the 2D result point is outside of the polygons due to floating point errors.

* Remove whitespace

* Revert 4a197ba22a as a raycast point path should have the Z retrieved with getPolyHeight(). Raycast will only return a 2-point path with Start and Hitpoint/End

* Cleanup PathGenerator raycast case

* Fix PathGenerator raycast broken if start and end are on same poly.
Fix PathGenerator raycast broken if no wall is hit.
Remove unused case of using raycast with an existing previous path (can be added back properly if needed).
Remove forcing poly length to 2 when we actually have already the right number.

* Use closestPointOnPolyBoundary on the second try of finding a point on poly for raycast.
Note that in this case the mesh height is not used which might cause issues. The poly boundary height will be used instead.

* Handle cases where getPolyHeight() fails because the point is on polygon border (and caused by floating point imprecision)

* Add far from poly flags

* Set PATHFIND_INCOMPLETE in raycast case if startFarFromPoly or endFarFromPoly

* Fix blink close to walls with no valid polygon behind the wall

* Require to re-extract mmaps

Co-authored-by: Ovah <dreadkiller@gmx.de>
# Conflicts:
#	src/server/game/Entities/Object/Object.cpp
2020-05-16 13:45:57 +02:00
Giacomo Pozzoni 08fbf3974e Core/Database: Fix build with Maria DB on some distros (#24248) 2020-05-05 16:27:07 +02:00
Shauren 47acc59f49 Core/DBLayer: Prevent committing transactions started on a different database 2020-04-15 21:02:26 +02:00
Shauren d003ebd8e4 Core/DBLayer: Prevent using prepared statements on wrong database 2020-04-15 19:18:58 +02:00
Shauren 5653d4e2de Core/DBLayer: Support using mysql 8 2020-04-15 10:19:24 +02:00
Ovahlord 4539b571bf Core/Packets: converted SMSG_MOTD and SMSG_LOGIN_VERIFY_WORLD to packet class 2020-04-11 18:22:01 +02:00
Ovahlord 9bfe43a88a Core/Entities: remove PhaseMask
* database fields and values will remain until they have been converted to their according phase IDs
2020-03-29 04:05:43 +02:00
Ovahlord f1f00c3ec3 Core/Datastores: refactor DBC storage helpers to use a class and fixed no pch build 2020-03-18 15:24:25 +01:00
Ovah 978a35b50c Scripts: removed dev tool command script loader 2020-02-24 14:40:52 +01:00
Ovahlord 507108d597 Scripts/DarkmoonIsland: implement Whack-a-Gnoll area restriction. No more unwanted guests in the gaming area! 2020-02-23 23:32:28 +01:00
Ovahlord 73ce49cb78 Core/Datastore: updated db2 field names and types to reflect client magic names
*fixed string length for sending names in item_sparse length
2020-02-23 02:20:38 +01:00
Ovahlord d9b854ad59 Core/Datastores: backported hotfix system implementation 2020-02-21 23:13:38 +01:00
Ovahlord 59120fbd38 Core/Quests: ported breadcrumb quest handlings and cleaned up quest template loading handlings 2020-02-20 05:08:09 +01:00
Ghaster df173c7e1c Core/Bnet: Cleanup/Improve Battle.net account commands (#33) 2020-02-19 02:52:11 +01:00
Ovahlord a9cc2a9954 Core/Scripts: removed dev tool scriptloader... again 2020-01-31 21:42:21 +01:00
jackpoz 183789053e Core/Misc: Fix GCC 8 warnings 2020-01-31 21:19:25 +01:00
Ovahlord b97b41276b Core/Scripts: removed a not existing dev tool command script registration 2020-01-31 11:31:37 +01:00