Commit Graph
405 Commits
Author SHA1 Message Date
Shauren f94deace76 Merge branch 'bfa' 2018-12-09 14:45:03 +01:00
Rushor 77cb6c1a3f Game/AI: Implement ContactDistance for ACTION_MOVE_TO_POS (#18720)
(cherry-picked from 60d1c0e20d3f8f32de81bff047531b927e586a97)
2018-12-09 14:18:42 +01:00
Traesh 9d210476e5 Core/Creatures: Update creature model handling with new display scale (#22567) 2018-11-07 20:23:30 +01:00
Shauren 738f37d3cf Core/Maps: Replaced spawnmask with difficulty list 2018-09-15 17:55:26 +02:00
Shauren 91be2332e2 Core/Entities: Phasing rewrite
* Optimized phase visibility checking
* Handle all phase flags

Closes #16758
Closes #21119
2018-03-25 19:28:36 +03:00
Kittnz 61a838b599 Core/SmartScript: update ACTION_GO_SET_GO_STATE
GO_STATE_ACTIVE             = 0,                        // show in world as used and not reset (closed door open)
GO_STATE_READY              = 1,                        // show in world as ready (closed door close)
GO_STATE_ACTIVE_ALTERNATIVE = 2                         // show in world as used in alt way and not reset (closed door open by cannon fire)

Credits to Sunwell
(cherry picked from commit 072ea761c6dc9891d0e929f0e618b7ae2327c421)

Tabs
(cherry picked from commit 65e84d2f0a77ec179bc6b0eaae2e4dc6b1daf9ef)
2018-03-18 00:19:39 +01:00
Riztazz 05fb27dae4 [3.3.5][master] Core/Movement: Smooth movement #13467 (#18020)
Implement smooth movement for all waypoint pathing and escortai

(cherry picked from commit 28050f338dfc66e0c40b6a3915bf96e38e0613e5)
2018-02-11 15:53:32 +01:00
joschiwald ed318fdc46 Core/Battleground: Dropped battleground texts from trinity_string and replaced them with proper BroadcastText 2018-01-14 18:48:01 +01:00
Mihapro 8199eef81c Core/Misc: Added helper function Unit::SetFullPower
* Also renamed Unit::getPowerType and Unit::setPowerType to follow style guidelines

Ref #20981
2018-01-03 16:39:32 +01:00
vincent-michael 7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Ovalord 1b16534e21 Core/Quests: Implemented quest popups 2017-11-28 00:04:03 +01:00
SnapperRy cc44c5f349 Core/SAI: reset event phase when calling SMART_ACTION_CALL_SCRIPT_RESET.
Now it really does what it says on the tin.

(cherry picked from commit c189e27f39f25982f5b9d808b7af0e11f57074ef)
2017-11-11 20:47:26 +01:00
SnapperRy 748aab737f Core/SAI: remove wrong DB errors.
It is normal to have events applicable only to certain instance difficulties.

Closes #18082.

(cherry picked from commit c42e32e7e4eac7f327f489248219f214b0d0d308)
2017-11-05 11:03:57 +01:00
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 727f77ec6ab9b507d86ffc482b2801fb5b9b907e)
2017-10-03 15:31:09 +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 3e596376a7fae9fd585fac12e5122fd8f1b7ce14)
2017-09-06 15:35:04 +02:00
ariel- f65897f3be Core/SmartAI: There's a function for that
(cherry picked from commit e2a8cf6809bdb2fbe118d38f3cdf49bbee3078f9)
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 5267381e39c23797bfad22c5433910ecf155145c)
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
Shauren a0a158b5b8 Core/Scripts: Include cleanup 2017-05-28 16:34:44 +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 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
joschiwald 2abfaecf0c Core/SAI: Fixed memory leak 2017-05-06 12:27:45 +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
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
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 6586885bcaf062c5f0fd6d6c7652b93c08e7c20c)
2017-02-26 21:31:16 +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 14445d2202de1b58dcb04c5457be682b8e7075ca)
2017-02-19 15:34:57 +01:00
treeston 5654fb9343 Merge branch '3.3.5-goshdangitsmartai' into 3.3.5 (PR #17738)
(cherry picked from commit e9eacae7b2ca3c8899a6ee9c8b8146e21fca54db)

Core/SmartScripts: Add missing break, 5f43e7b follow-up.
(cherry picked from commit a4623efaa67be1cfea19e561be83f118a784b9d1)
2017-02-19 15:07:42 +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 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 d55426f5b4e431e6d398b1e2dbbd25f7387328f2)
2017-02-18 17:50:00 +01:00
ariel- c04384b691 Core/SmartAI: fix warning reported by VS2015
(cherry picked from commit 83c032c2a8cd688183c29ca5caffc26817d11a03)
2017-02-18 15:49:06 +01:00
SnapperRy 8220496be1 Core/SmartAI: allow SMART_TARGET_OWNER_OR_SUMMONER to target a temporary summon's summoner, too (#17851)
Core/SmartAI: allow SMART_TARGET_OWNER_OR_SUMMONER to target a temporary summon's summoner, too
(cherry picked from commit 1fcd03b60a17db5fddef13feb6fe6b8d7178d0f5)
2017-02-18 14:47:01 +01:00
SnapperRy 6ea973adec Core/SmartAI: add param2 to SMART_ACTION_UPDATE_TEMPLATE, allowing to specify if creature's level should remain the same between entry updates.
A value of 0 (default) forces the creature to keep its current level between entry updates.

Fixes #16371

(cherry picked from commit a6ef9d45395be0f4551a55439c7790a288c40df8)
2017-02-18 14:47:01 +01:00
treeston 573cb9d20f AI/SmartScripts: SMART_ACTION_ADD_QUEST -> SMART_ACTION_OFFER_QUEST. Open quest offer instead of adding straight to log - old behavior can be requested using action_param2. Closes #17735.
(cherry picked from commit ba4d6f63936fe3269e6c8b75358bc00a78fd49df)
2017-02-12 16:07:27 +01:00
treeston 7b13e98327 AI/SmartScripts: Add param3 to SMART_ACTION_CAST and SMART_ACTION_INVOKER_CAST that allows specific triggered flags to be set (rather than all-or-nothing). Ignored if SMARTCAST_TRIGGERED is not set.
(cherry picked from commit 9072e0221b39c19fb6be154c623f45d6a9433db0)
2017-02-12 15:50:43 +01:00
treeston b18b05ee4a AI/SmartScripts: Add SMART_ACTION_DISABLE_EVADE (117).
(cherry picked from commit 14b44af38d33be0cab4cb081c1f911b20db8884c)
2017-02-12 15:46:58 +01:00
treeston d0f4588652 Core/SmartScripts: Add SMART_TARGET_LOOT_RECIPIENTS. Does what it says on the tin.
Use this new target type to fix The Rider of Blood, The Rider of Frost, The Rider of the Unholy. Closes #17817.

(cherry picked from commit e2c915fb43ae27d695c0ab410fb1b14222745e27)
2017-02-12 15:46:19 +01:00
treeston 8d7ab10efa Scripts/SmartAI: Some clean-up work:
- NULL -> nullptr
- Rename "AssistPlayerInCombat(who)" to "AssistPlayerInCombatAgainst(who)" to reflect what the method actually does
- Code style

No functionality was changed.

(cherry picked from commit 152b3ad5b997f4be06c5bb55ddb15c57a8e28c3b)

# Conflicts:
#	src/server/game/AI/SmartScripts/SmartAI.cpp
#	src/server/game/AI/SmartScripts/SmartScript.cpp
2017-02-11 22:34:59 +01:00
ariel- c429e7d489 Core/Entities: debloat SummonGameObject parameter list using proper wrappers and enable GO rotation in scripts
- There's still an overload allowing for x, y, z, o to be passed directly
- Fixed default animstate for GameObject creation in many places, it should be 255, not 100 (checked in sniffs)

(cherry picked from commit 62bfee37cb21584cef631dda428feaf5eb829cda)

# Conflicts:
#	src/server/game/Battlefield/Battlefield.cpp
#	src/server/game/Battlegrounds/Battleground.cpp
#	src/server/game/Entities/GameObject/GameObject.cpp
#	src/server/game/Entities/GameObject/GameObject.h
#	src/server/game/Entities/Object/Object.cpp
#	src/server/game/Entities/Object/Object.h
#	src/server/game/Spells/SpellEffects.cpp
#	src/server/scripts/Commands/cs_gobject.cpp
#	src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp
#	src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
#	src/server/scripts/Kalimdor/zone_feralas.cpp
#	src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
#	src/server/scripts/Northrend/Nexus/EyeOfEternity/instance_eye_of_eternity.cpp
#	src/server/scripts/OutdoorPvP/OutdoorPvPSI.cpp
2017-02-11 20:50:29 +01:00
SnapperRy 3e74109857 Core/SmartAI: change SMART_ACTION_RISE_UP (114) to SMART_ACTION_MOVE_OFFSET and implement offset movement via target fields. (#17362)
(cherry picked from commit ba0cb53b0214ab3625830f7dac3c68d08a97e084)

Rename 9999_99_99_99_world.sql to 2016_07_15_07_world.sql
(cherry picked from commit 2fd124f9a3cbbd81f2ce6c7154d640175ed71452)
2017-02-05 17:45:07 +01:00
ariel- d40c151cc8 Core/Scripts: Extended SMART_ACTION_SET_INST_DATA to also set BossStates. (#16739)
Scripts/Dire Maul: Initialize boss states array so it may be called from SmartAI. (Ref #6429)
(cherry picked from commit d1d0c64ad11cb3faf986a5332fec6b704fb8026c)

# Conflicts:
#	src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
2017-01-29 18:04:10 +01:00
Snapper 36a896e28a Core/SmartAI: delay SMART_ACTION_FLEE_FOR_ASSIST if creature is rooted/stunned.
Prevents creatures from teleporting around when fleeing while stunned/rooted.

(cherry picked from commit aaf10dccb09935e8618389df99b2f8616458cf6b)
2017-01-12 23:17:37 +01:00
treeston 1a7b4fbe4d AI/SmartScripts: Add action_param3 "disablePathfinding" to SMART_ACTION_MOVE_TO_POS (69).
(cherry picked from commit 123e45c119b39ec36e5051bf83f52da2fa75f376)
2017-01-12 00:07:29 +01:00
Snapper fbb9fc0228 Core/SmartAI: remove unneeded check for SMART_ACTION_FORCE_DESPAWN.
Gameobjects do not need to use SmartAI in order to be targeted by other entities' scripts.

(cherry picked from commit 9803e58392eea0828aac96cd79a794a77323d9d0)
2017-01-12 00:02:29 +01:00
vincent-michael 86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
lafoniz b4778cefce Core/SmartScripts: Improve SMART_EVENT_DISTANCE_CREATURE so it can be used with SMART_TARGET_ACTION_INVOKER
Closes #16752

(cherry picked from commit a05a871d7ce575e4e748c4dc65d4dc9609412efa)
2016-04-23 16:55:14 +02:00
MitchesD 92b74d6bdc Merge pull request #16523 from tkrokli/smart_action_set_corpse_delay
[3.3.5][6.x]Core/SmartScript: create SMART_ACTION_SET_CORPSE_DELAY
(cherry picked from commit 8e152e0d4a553bdc215d2c7fda41083b5382b235)
2016-04-08 23:51:18 +02:00