Commit Graph

5456 Commits

Author SHA1 Message Date
Treeston
e51960ea45 Core/PlayerAI: Some adjustments:
- Add a 2 second delay before the AI begins using spells. This should provide opportunity for counterplay before that rogue activates cloak and goes on an unstoppable rampage among your healers. (Sorry, guys.)
- Stopped the AI from attacking invalid targets under some conditions. It should now properly leash back and follow the charmer if we try to select an invalid target.
- Stopped the AI from constantly re-creating the follow movement generator (and thus spamming movesplines).

(cherry picked from commit 331e463de8)
2020-08-20 00:11:18 +02:00
Treeston
2c92e09230 Scripts/Auchindoun: Last one, hopefully. Remove reliance on large grid searchers by integrating with instance script.
(cherry picked from commit d80d7c6685)
2020-08-20 00:08:04 +02:00
Treeston
6599dab1e1 Scripts/Auchindoun: Blackheart the Inciter fully fixed now. I had way too much fun with this one.
Two points of note:
1) Spawning 5 invisible triggers with 5 distinct factions which then MC one target each? Biggest. Hack. Ever. Best part? It's blizzlike.
2) For over ten years, I thought it was spelled "Auchinodoun". It's not. It's spelled "Auchindoun". TIL.

(cherry picked from commit 04dc47e7e2)
2020-08-19 23:50:31 +02:00
Treeston
8a1739d15e Scripts/Auchindoun: Replace the Blackheart the Inciter hack-filled script with a slightly less hack-filled script that actually mostly works. This should at least make the boss encounter possible to complete. No claims to correctness, of course.
(cherry picked from commit a38141fd6c)
2020-08-19 23:47:25 +02:00
Treeston
b1d2e4e906 Scripts/Spell: Port spell_generic.cpp to new script registration syntax wherever possible. No actual changes in functionality. (fb87ac8 follow-up)
(cherry picked from commit 49aa8a2e59)
2020-08-19 23:42:29 +02:00
Treeston
4f676221b8 Scripts/Item: Port spell_item.cpp scripts to new script registration syntax wherever possible. No actual changes in functionality. (fb87ac8 follow-up)
(cherry picked from commit 37f59f8850)
2020-08-19 21:38:47 +02:00
treeston
89006f621e Scripts/Item: Change Nitro -> Boosts <- to use the correct knockup effect for their backfire. Also, script that knockup effect to work properly ("usually" deploy a rescue parachute).
(cherry picked from commit 02b1d8bb48)
2020-08-19 20:51:03 +02:00
treeston
0f741c4a7f Scripits/Item: Nitro. BOOSTS.
(cherry picked from commit 125127ea73)
2020-08-19 20:18:44 +02:00
treeston
ba7d8e9ace Scripts/Item: Fix Nitro Boosts to only fail in flyable areas. Also, it's called nitro _boosts_. Not _boots_. Nitro _boosts_.
(cherry picked from commit f953d85960)
2020-08-19 20:18:24 +02:00
jackpoz
31654a2295 Core/Misc: Fix static analysis issues
(cherry picked from commit b2a341df6e)
2020-08-18 19:42:54 +02:00
Regigicas
e43d81cd68 Scripts/Commands: Fix a crash on summon when no group is avaible (#20029)
Closes #20027

(cherry picked from commit d9c83a6c01)
2020-08-18 19:16:04 +02:00
treeston
814f7e45fb Some more script adjustments ported from #19930.
(cherry picked from commit 3f8c0cb446)
2020-08-18 18:53:13 +02:00
treeston
2dfafa69eb Hi, I'm Treeston, and welcome to Combat PR Prep Refactors.
Today, we're moving UNIT_FLAG_IMMUNE_TO_PC and UNIT_FLAG_IMMUNE_TO_NPC to higher-level abstraction so combat manager can react to it.
New methods on Unit:
- void SetImmuneTo<All/PC/NPC>(apply, keepCombat = false);
- bool IsImmuneTo<All/PC/NPC>() const;

(cherry picked from commit 74af880217)
2020-08-18 18:53:13 +02:00
Keader
db80892a41 Build fix
(cherry picked from commit 3aadb72eaa)
2020-08-18 18:53:13 +02:00
Keader
251c1811ae Core/Custom: Fixed SPELLMOD_COOLDOWN exploit on Duel Reset system
Followup 0048d4b618
Closes #17419

(cherry picked from commit e254ebebbe)
2020-08-18 18:53:13 +02:00
Nyeriah
5b8d3ede7d Scripts/Karazhan: Fix Attumen and Midnight not moving towards each other on phase transition after latest changes
(cherry picked from commit 746fce30d9)
2020-08-18 18:53:13 +02:00
treeston
2c88d9f162 Some more refactoring prep for combat/threat (#19930).
(cherry picked from commit 2739a5c5f5)
2020-08-18 18:53:13 +02:00
Keader
04c303a7e5 Core/Custom: Fixed Duel Reset Exploits
Close #17419
*Fixed exploit with SPELLMOD_COOLDOWN
*Fixed exploit with some items (like Sylvanas' Music Box)
*Little cleanup

(cherry picked from commit 0048d4b618)
2020-08-14 17:38:52 +02:00
Shauren
1c52d5fff7 Core/Misc: Replace NULL with nullptr 2020-08-14 17:06:03 +02:00
Treeston
8be23fcbbd [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.

(cherry picked from commit e2a1ccd118)
2020-08-13 22:46:44 +02:00
Artamedes
e85bd8fd39 Scripts/Stockades: Cleanup the scripts (#23524)
* Scripts/Stockades: Cleanup the scripts

Scripts looked ugly before, now they are less ugly
Move Mortimer Moloch and Warden Thelwater to use TaskScheduler rather than EventMap
Use new script registers
Cleanup some other code

Co-authored-by: Carbenium <carbenium@outlook.com>
2020-08-10 20:50:25 +02:00
Treeston
e9392ad287 Core/Authserver: Authserver cleanup (PR#25093)
- Fix a handful of 1/256 bugs with most significant byte zero in BigNumber
- Get rid of (most of) the C-style arrays in authserver
- CryptoRandom as a unified source for cryptographic randomness
- Bring our other crypto APIs into 2020
- BigNumber usability improvements
- Authserver is now actually readable as a result of all of the above

(cherry picked from commit 210176fd91)
2020-08-03 19:39:00 +02:00
Aokromes
c9e3356ba4 Core/Creatures: Fix typo 2020-07-31 12:37:31 +02:00
Shauren
1340f2cdb3 Core/Creatures: Move gossip trainer assignment to creature_trainer table - same gossip can open different trainers depending on which creature it is assigned to
Closes #21723
2020-07-31 11:21:24 +02:00
treeston
118e53f1b8 Combat/threat rewrite prep - merge RBAC/DB changes.
(cherry picked from commit e35092c6a1)
2020-07-16 22:06:56 +02:00
S.V
ced4820252 Core/Scripts: Fixed GAMEOBJECT_TYPE_DOOR closing automatically after being opened with .gobj act (#19342)
Closes #19261.

(cherry picked from commit 3eba093704)
2020-07-16 22:00:30 +02:00
ariel-
148dc34cb2 Core/Scripts: fix array out of bounds in Pit of Saron doorData
(cherry picked from commit 08d0105396)
2020-07-16 22:00:30 +02:00
treeston
f8fa4d734c Correct some missing auth DB changes from b59ca1c.
(cherry picked from commit 41eddd59aa)
2020-07-16 22:00:30 +02:00
treeston
29db04c3c9 Rename .debug uws to .debug worldstate (clarity change).
(cherry picked from commit b59ca1cc81)
2020-07-16 22:00:29 +02:00
treeston
64d8b183de Add new command 'npc showloot'. Does exactly what it says on the tin.
(cherry picked from commit 6f29aac936)
2020-07-16 22:00:29 +02:00
treeston
17a0139b0e - Add new commands .group set assistant, .group set maintank and .group set mainassist to toggle raid member flags.
- Fix 2017_05_29_00_auth.sql to be reapply safe.

(cherry picked from commit ac0f76f8c5)
2020-07-16 22:00:29 +02:00
treeston
7df8546d7e Removed a now-unused local (ca02629 follow-up)
(cherry picked from commit 4e41d3e6bd)
2020-07-16 22:00:29 +02:00
treeston
f543e570d6 Make some adjustments to .summon and .group summon behavior to make them more permissive:
- Now only requires the either target's group leader or target itself to be on your map
- Now summons all applicable group members even if one member fails checks
- No longer has some truly weird edge case instance unbind code that could cause exploit behavior (Really, I have no idea why this existed, because it certainly didn't do what it might've been meant to do.)

(cherry picked from commit ca02629950)
2020-07-16 22:00:29 +02:00
ariel-
8abbc097a0 Core/Scripts: fix some /W4 warnings
(cherry picked from commit d6cae113c6)
2020-07-16 22:00:29 +02:00
ariel-
47ca8cb021 Core/OutdoorPvP: fix another warning
(cherry picked from commit 6b49380806)
2020-07-16 22:00:29 +02:00
ariel-
66d66b00ee Core/OutdoorPvP: fix warning
(cherry picked from commit a05e1095c6)
2020-07-16 22:00:29 +02:00
ariel-
bd96262248 Core/OutdoorPvP: refactor using Position and Quat to pack parameters
- Moved statics to cpp
- Save scriptids into an array

(cherry picked from commit 3e7b64b2f7)
2020-07-16 22:00:29 +02:00
ariel-
ca5cbad6f0 Core/Scripts: remove non-player objects (ie corpses) from Sindragosa's Fury targetlist
(cherry picked from commit b3336cf943)
2020-07-16 22:00:28 +02:00
treeston
5392212799 So, I came in trying to fix gameobject LoS. So I restructured some stuff.
Then it turned out that gameobject LoS is already fixed. So all this does, really, is restructure some stuff.
And remove the hack from Sapphiron because I could.

(cherry picked from commit d57307f63d)
2020-07-16 22:00:28 +02:00
jackpoz
a3dbf4b088 Core/Scripts: Simplify code
Partially revert 753e7074d8 and 12c680f9b1 to simplify the code and to only remove GMs from the target list.

(cherry picked from commit f9cfc202e9)
2020-07-16 22:00:28 +02:00
ariel-
e300d39562 Core/Scripts: filter out corpses from Sindragosa's Fury targetlist
- This would incur in a crash after attempting to convert the Corpse object into Player

Closes #19227
Closes #19862

(cherry picked from commit 753e7074d8)
2020-07-16 22:00:28 +02:00
Treeston
51ce3b1c1d [3.3.5] Get zone/area IDs from vmap data in the liquid update (#19840)
* Add new method Map::getFullVMapDataForPosition to get area info and liquid info in a single vmap lookup
* Use this lookup in Map:: relocation methods to update m_areaId and m_zoneId fields on WorldObject
* Adjust GetZoneId/GetAreaId on WorldObject to always return these cached fields
* Clean up liquid state handling on Unit and Player
* Hand floor's Z coord up through GetFullTerrainStatusForPosition, use it to update a new field in WorldObject, and use that to feed a new GetFloorZ call on WorldObject.

Closes #16489

(cherry picked from commit f6c849729b)
2020-07-16 22:00:24 +02:00
Treeston
f7a7d02a7f Pet/Guardian AI hook re-organizing (#19824)
* Pet/Guardian AI hook re-organizing:
- Adjust OwnerAttacked/OwnerAttackedBy hooks on CreatureAI to fire for all owned units, not just player pets. This should allow guardians to more reliably recognize valid targets.
- Kill off the AttackedBy hook. While it was defined in CreatureAI.h as virtual, it was only ever invoked for player pets in specific situations. This makes it classic developer bait.
  - Adjust PetAI to use DamageTaken instead of AttackedBy.
  - Adjust behavior of AttackStart on PetAI to compensate.

(cherry picked from commit 1660bb7d27)
2020-07-16 21:47:28 +02:00
ariel-
5903a10a83 Core/AI: segregate GameObject ReportUse from normal Use (lock open/normal click)
Closes #19819

(cherry picked from commit 2335b9de1a)
2020-07-16 21:47:28 +02:00
TecDian
1aaf09b199 Core/Scripts: simplify speech for DK races quests
(cherry picked from commit 3f34c2f5eb)
2020-07-16 21:47:27 +02:00
sirikfoll
1d99860757 Core/Scripts: Updated Sunwell Plateau instance model
(cherry picked from commit 2984def452)
2020-07-16 21:47:27 +02:00
treeston
4179036bbe Some improvements to .debug raidreset command. Now supports heroic difficulty 5-man dungeons and outputs sensible text, as opposed to silently doing (or not doing) stuff.
(cherry picked from commit a3b198c7e1)
2020-07-16 21:47:15 +02:00
Shauren
deca201f77 Core/DataStores: Simplified string memory allocation in db2 files, dropped unneccessary level of indirection 2020-06-27 13:33:17 +02:00
Shauren
bbdabd7d77 Core/Players: Remove deprecated skill related config AlwaysMaxWeaponSkill and command .maxskill 2020-06-25 14:45:28 +02:00
ForesterDev
01d098830a DB/Account: update account_access table (#24788)
* DB/Account: update account_access table:

- rename fields id -> AccountID, gmlevel -> SecurityLevel
- add Comment field
- rename command .acc set gmlevel to .acc set seclevel

* Update auth database

* Fix primary key

* Temporary restore old command account set gmlevel with same handler as account set seclevel

Use Optional  for realmID - if not set, use -1 (for all realms)

* Rename 2020_XX_XX_00_auth.sql to 2020_06_20_00_auth.sql

* Update auth_database.sql

* Rename 2020_XX_XX_00_world.sql to 2020_06_20_06_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 8e0365d8a6)
2020-06-22 11:03:31 +02:00