Commit Graph

1127 Commits

Author SHA1 Message Date
SnapperRy
53dde7e2ca Core/SAI: always use DespawnOrUnsummon() for SMART_ACTION_FORCE_DESPAWN.
SmartAI uses that same method internally, so there's no need to handle it in two different ways.

Does not affect functionality, but prevents useless SAI error log in case the target creature is not using SAI.

(cherry picked from commit 727f77ec6a)
2017-10-03 15:31:09 +02:00
Shauren
e0b2bad7d5 Core/Creatures: Changed NearestAttackableUnitInObjectRangeCheck to only consider neutral units as targets if they are already in combat with target searching unit
Closes #13630
Closes #20205

(cherry picked from commit c8fdda7f86)
2017-09-09 23:32:21 +02:00
ariel-
d7c85d7193 Core/SmartScripts: fixup SMART_EVENT_FLAG_WHILE_CHARMED behaviour to only mean charmed creatures (#17738 follow-up)
Unit::IsControlledByPlayer is a expected value for TempSummons (like some triggers used in quests, summoned by spells).
Previous logic broke a lot of quests which use triggers to do stuff.

Allow JustSummoned and events linked from other events with flag set also in charmed (prevents breaking event chains)
Allow vehicles (needed for vehicles with SmartAI, eg Iron Rune Constructs and You: Rocket Jumping)

(cherry picked from commit 3e596376a7)
2017-09-06 15:35:04 +02:00
ariel-
49648b6681 Core/AI: added container independent wrappers for WorldObject::GetxxxInGrid
(cherry picked from commit 271dd0788d)
2017-09-06 13:36:05 +02:00
ariel-
f65897f3be Core/SmartAI: There's a function for that
(cherry picked from commit e2a8cf6809)
2017-09-05 19:19:21 +02:00
SnapperRy
8cb5368062 Core/SAI: don't reset event phase when npc evades/resets.
The scripts themselves should take care of that.

(cherry picked from commit 5267381e39)
2017-09-05 12:14:15 +02:00
Malcrom
acbc3f5a68 Core/Smartscripts: Add respawn timer to smartscript despawn (#20070) 2017-07-22 22:34:23 +02:00
Shauren
b453e12423 Core/Game: Include cleanup part 5
* ObjectMgr.h
* Player.h
* Unit.h
* G3D should no longer propagate everywhere from Spline/MotionMaster
2017-06-04 01:00:45 +02:00
Gacko
5236e6ee22 Fix non-PCH build.
Required by: std::reference_wrapper.
2017-05-29 22:52:43 +02:00
vincent-michael
e67beefe15 Core: Fixed warnings 2017-05-28 16:56:33 +02:00
Shauren
a0a158b5b8 Core/Scripts: Include cleanup 2017-05-28 16:34:44 +02:00
Shauren
2200b4b0e1 Nopch fix 2017-05-24 21:30:43 +02:00
Shauren
3d7c2ef88f Core/Game: Include cleanup, part 4 - packets and largest headers (after preprocessing, except player/objectmgr) 2017-05-21 23:18:43 +02:00
Shauren
f2039981e0 Core/Game: Include cleanup, part 3 2017-05-20 00:09:37 +02:00
Gacko
506de19495 Game/SAI: Negate p instead of using abs. 2017-05-19 17:44:43 +02:00
Gacko
82d93f7712 Fix non-PCH build. 2017-05-19 17:38:45 +02:00
Shauren
c5d3dd90be Core/Game: Include cleanup
* Mostly aimed at removing Log/DatabaseEnv includes from other headers
* Fix most packet headers including other packet headers - moved common structures such as ItemInstance to their own files
* Moved SAI function definitions to source files (massive or requiring many different dependencies)
2017-05-18 23:53:25 +02:00
Shauren
9299e9bde0 Core/Grids: Ported cmangos/mangos-wotlk@ea99457e50 2017-05-13 19:37:33 +02:00
Shauren
7e538980a2 Core/Database: Include cleanup 2017-05-12 18:50:27 +02:00
joschiwald
2abfaecf0c Core/SAI: Fixed memory leak 2017-05-06 12:27:45 +02:00
Aokromes
fae7ce4930 Core/AI: Remove incorrect call
By Malcrom
2017-04-01 21:26:59 +02:00
Aokromes
abc8fe123b Core/SmartAI: Missing parts on previous commit
By Malcrom
2017-03-26 01:07:09 +01:00
Aokromes
7b7c90d4fb Core/SmartAI: Implement SMART_TARGET_VEHICLE_ACCESSORY
By Malcrom
2017-03-23 04:12:56 +01:00
Shauren
f097e341f5 Core/Utilities: Rename RandomResizeList->RandomResize as it is no longer restricted to a list
* Also fix gcc build
2017-03-23 00:11:58 +01:00
Aokromes
464ba05dd4 Core/SmartAI: Add check to SMART_ACTION_PLAY_ANIMKIT to allow zero value to remove animKit.
By Malcrom
2017-03-21 23:27:07 +01:00
Shauren
4557aa8a1b Build fix 2017-03-21 21:48:56 +01:00
Traesh
9cc5273cd2 Core/AreaTriggers: Areatrigger rework script system + fix priest angelic feather
Closes #19171
2017-03-21 18:14:23 +01:00
Traesh
01ded93a42 Core/AI: enable SmartScripts on Scenes + add scene related actions/events
Closes #19194
2017-03-17 21:21:35 +01:00
Lopfest
61547cab59 Core/SAI: added new action SMART_ACTION_PLAY_ANIMKIT (#19170) 2017-03-11 13:39:38 +01:00
ariel-
d20459f00e Core/Creatures: disabled "automatic" monster sparring
- Faction template flags weren't correct.

Closes #19245

(cherry picked from commit b2fc4c65ed)
2017-03-07 01:30:41 -03:00
Treeston
f02ff3bd6b [3.3.5] Azjol-Nerub rewrite
* Scripts/AzjolNerub: Complete rewrite.
- Gatewatcher:
  - Trash now actually engages properly one by one
  - Fix trash spell casting
  - Add missing quotes
- Hadronox:
  - Everything. Literally.
- Anub'arak:
  - Fix add spawns
  - Fix impale
  - OK this might as well be "fix everything with every boss". Because that's pretty much what happened.
- General hack cleanup

* Update and rename 9999_99_99_99_AZJOLNERUB.sql to 2016_09_25_01_world.sql

* Update and rename 2016_09_25_01_world.sql to 2016_09_25_02_world.sql

* Rename 2016_09_25_02_world.sql to 2016_09_26_02_world.sql

(cherry picked from commit 4b990eb7d7)

# Conflicts:
#	src/server/game/Spells/SpellMgr.cpp
#	src/server/scripts/Northrend/AzjolNerub/AzjolNerub/azjol_nerub.h
#	src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp

Update boss_hadronox.cpp
(cherry picked from commit 04ec868768)

Update boss_hadronox.cpp

I hate travis, learn from buildbot
(cherry picked from commit aeb20951bb)

I think I got all of them this time

No idea how this one got past travis.
(cherry picked from commit ae163197a7)

Fix nonPCH.
(cherry picked from commit e121d66fbb)

...for real this time (seriously - what happened to test builds before merging, Aok?)
(cherry picked from commit dbe0789eba)

.....hail PCH
(cherry picked from commit 2528194cc1)

and you get a header, and everyone gets a header...
(cherry picked from commit 5e5fe37a7e)
2017-03-04 00:05:55 +01:00
treeston
205ec4c3bf Core/Unit: Standardize SetFacingTo and SetFacingToObject behavior while moving. Both now fail while moving unless arg2 bool is true.
Movement/SplineChain: Bump value range for DB chainId up to uint16 (0 to 65535) from uint8 (0 to 255). Turns out sniffs generate far more chains than I expected.

(cherry picked from commit 2170541a51)

Code style follow-up, I blame Notepad++.
(cherry picked from commit 7860da0de6)
2017-03-02 20:47:29 +01:00
treeston
59d48ce7e4 Core/Movement: Add new SplineChainMovementGenerator that allows accurate replication of sniffed waypoints in static sequences, along with DB facilities that allow loading of waypoints from DB.
(cherry picked from commit 6d00d3f283)

Merge remote-tracking branch 'Treeston/3.3.5-splinechains' into 3.3.5 (PR #17946)
(cherry picked from commit 20f483967f)

Core/Movement: Add a convenience default ctor to SplineChainResumeInfo, and fix PCH build in some configurations (zzz why do we even keep Appveyor and Travis around).
(cherry picked from commit 4fa646c0b2)

PCH build fix. Again.

(( Alright, you made me waste 20 minutes of my life on a full nonPCH rebuild of the core now. ))
(( I hope you're happy. ))
(cherry picked from commit 4a1a460241)
2017-03-01 22:03:35 +01:00
SnapperRy
1b288ebbdd Core/SmartAI: do not target player's group for SMART_ACTION_CALL_AREAEXPLOREDOREVENTHAPPENS.
SMART_TARGET_INVOKER_PARTY or SMART_ACTION_CALL_GROUPEVENTHAPPENS should instead be used to achieve this functionality.

(cherry picked from commit 6586885bca)
2017-02-26 21:31:16 +01:00
treeston
e941d7e04b Creature/Scripting: Move CreatureAI::CanRespawn to CreatureScript::CanSpawn. Now also applies to initial spawn. Dynamic spawning prep.
(cherry picked from commit b3d44d6c36)

Game/Scripting: Follow-up to b3d44d6. Fix script selection for creatures on difficulty > 0.
(cherry picked from commit 91c2b3162d)

Build fix.
(cherry picked from commit a9f1151f2c)

Fine, this time I actually built it. Promise.
(cherry picked from commit 0c2c88ed50)
2017-02-26 15:30:15 +01:00
treeston
9c36dd7e94 AI/SmartAI: Fix an issue where SmartAI creatures would not properly follow their owner on evade. Also fix a bug where creatures with INHABIT_ROOT would get stuck in evade under certain conditions.
This allows us to fix quest 12261 (No Place to Run). Closes #16291.

(cherry picked from commit e69a483aa9)

Derp. Build fix.
(cherry picked from commit 9180bcd404)
2017-02-26 15:30:15 +01:00
ariel-
945bbbfa77 Core/AI: updated SpellTargetSelector::operator() (#17824 follow-up)
(cherry picked from commit 805637cea1)
2017-02-26 15:30:14 +01:00
Shauren
bfe4733195 Build fix 2017-02-21 21:05:37 +01:00
Shauren
3fce636c19 Revert "Fix non-PCH build." and fix it the proper way
This reverts commit 438d090c8d.
2017-02-20 17:39:31 +01:00
ariel-
b239afb0ef Core/Misc: calculate rotation fields from orientation in some places it's impossible to get:
- SmartScripts: SMART_ACTION_SUMMON_GO
- Spell Effects:
  * SPELL_EFFECT_DUEL
  * SPELL_EFFECT_SUMMON_OBJECT_WILD
  * SPELL_EFFECT_SUMMON_OBJECT_SLOT1
  * SPELL_EFFECT_SUMMON_OBJECT_SLOT2
  * SPELL_EFFECT_SUMMON_OBJECT_SLOT3
  * SPELL_EFFECT_SUMMON_OBJECT_SLOT4
- Command Scripts: .gobject add

Closes #17891

(cherry picked from commit 14445d2202)
2017-02-19 15:34:57 +01:00
treeston
dd0df772df Scripts/Events: Globally fix all ExecuteEvent loops to check UNIT_STATE_CASTING after each iteration, instead of just checking it once initially.
Fixes and closes #17892.

(cherry picked from commit ac62d7156f)

Drycoding is bad, mmkay?
(cherry picked from commit ed83a35fbe)
2017-02-19 15:09:02 +01:00
treeston
5654fb9343 Merge branch '3.3.5-goshdangitsmartai' into 3.3.5 (PR #17738)
(cherry picked from commit e9eacae7b2)

Core/SmartScripts: Add missing break, 5f43e7b follow-up.
(cherry picked from commit a4623efaa6)
2017-02-19 15:07:42 +01:00
Gacko
438d090c8d Fix non-PCH build.
What else?
2017-02-19 14:36:21 +01:00
Shauren
5dbe9e7890 Core/Creatures: Implemented all creature equipment modifiers
* It is now possible to give creatures a mythic/heroic weapon

Closes #19160
2017-02-19 10:58:08 +01:00
treeston
52f400226e Replace a leftover const char* with a std::string const&.
(cherry picked from commit c0de28b045)
2017-02-18 17:54:11 +01:00
treeston
bbbf8df8e5 Entities/Gossip: The Big One™ that gets rid of all uses of The Bad™ and The Ugly™, e.g. gossip preprocessor macros, and replaces them with the new-and-shiny gossip functions.
(cherry picked from commit d55426f5b4)
2017-02-18 17:50:00 +01:00
treeston
f94dc007ae Fix dynamic build.
(cherry picked from commit 54f923fdee)
2017-02-18 17:30:23 +01:00
treeston
a0d48b92d5 Creature/Gossip: offer replacement functions for the existing preprocessor gossip macros
(cherry picked from commit 175db157f7)

You saw nothing (build fix).
(cherry picked from commit 72a7f4b507)

Build fix. Again. Oops.
(cherry picked from commit 61eb70fd82)

....right, I actually went through a full rebuild now just to make sure it works.
(cherry picked from commit 8531f012a2)

Last one. For real. Please. (Build fix #5).
(cherry picked from commit a32536d490)
2017-02-18 17:22:53 +01:00
treeston
5c01d14056 Entities/Creature: Add arg2 to DespawnOrUnsummon to allow overriding respawn time. This matches changes that will be merged as part of dynamic spawning, allowing scripts to transition early.
(cherry picked from commit 4bcc8078d7)
2017-02-18 17:16:10 +01:00
treeston
df0d32be81 Merge remote-tracking branch 'Treeston/3.3.5-kelthuzad' into 3.3.5 (PR #16634)
(cherry picked from commit 47a9cb1e56)

...Huh. Wonder how this one didn't make travis complain on the PR.
(cherry picked from commit 93a68d5881)

Was Travis completely napping on this one?
(cherry picked from commit 2d7dec0d39)
2017-02-18 15:57:19 +01:00