Commit Graph

654 Commits

Author SHA1 Message Date
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 e2c915fb43)
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 152b3ad5b9)

# 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 62bfee37cb)

# 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 ba0cb53b02)

Rename 9999_99_99_99_world.sql to 2016_07_15_07_world.sql
(cherry picked from commit 2fd124f9a3)
2017-02-05 17:45:07 +01:00
Aokromes
927561c4cf DB/Quest: fix availability for some quests
Closes #17371 by SnapperRy
(cherry picked from commit a307157dac)
2017-01-29 20:45:47 +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 d1d0c64ad1)

# 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 aaf10dccb0)
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 123e45c119)
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 9803e58392)
2017-01-12 00:02:29 +01:00
ForesterDev
5c2705fadc Core: updated creature type flags enum (#17128)
Core/Misc: Update CreatureTypeFlags enum according to TrinityCoreWiki
(cherry picked from commit fb0881398a)

# Conflicts:
#	src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
#	src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
#	src/server/game/AI/SmartScripts/SmartAI.cpp
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Miscellaneous/SharedDefines.h
2017-01-09 02:00:17 +01:00
treeston
489027703e Entities/Unit: Finally fix no-path evasion.
- When a creature cannot find a path to its victim, it begins evading all attacks and regenerating health.
- If this persists for 5 seconds, it evades back to spawn position with new EvadeReason value EVADE_REASON_NO_PATH.
- Also some SmartAI cleanup (why oh why does it have so much duplicated code) and getting rid of #defines in favor of type-checked compile-time constants.

(cherry picked from commit 7b1560fccb)
2017-01-07 21:33:28 +01:00
treeston
f93730b160 CreatureAI: Adjust AI behavior when a charm ends. OnCharmed will be invoked on the creature's base (non-charmed) AI, allowing the AI to react to the creature no longer being charmed.
(cherry picked from commit 26b084a90f)

align fix
(cherry picked from commit 58486fc19a)
2017-01-07 21:05:34 +01:00
vincent-michael
86b98686a9 Update copyright note for 2017
Happy new year
2017-01-01 16:23:13 +01:00
Shauren
d2733eb6f1 Merge branch '6.x' of https://github.com/TrinityCore/TrinityCore into legion 2016-06-13 21:00:25 +02:00
Shocker
b539ac6afa Core/GameObjects: Add isUse parameter to GossipHello for distinction between CMSG_GAMEOBJECT_USE and CMSG_GAMEOBJECT_REPORT_USE 2016-05-26 13:09:56 +03:00
Shauren
885d9b53c3 Core/DataStores: Updated dbc/db2 to 7.0.1.20994 2016-05-20 23:48:48 +02:00
Shauren
5c2c9a684f Core/DataStores: Updated dbc/db2 to 7.0.1.20810 2016-05-20 23:46:17 +02:00
Rushor
2265e33cc2 Merge pull request #16503 from Rushor/evading
[3.3.5][6.x]Core/Unit: Do not remove auras from Pets and Guardians after evading
(cherry picked from commit e869ccb297)
2016-04-28 17:20:40 +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 a05a871d7c)
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 8e152e0d4a)
2016-04-08 23:51:18 +02:00
treeston
9e07adccf4 I don't like drycoding. It's coarse and rough and irritating and it gets everywhere.
(cherry picked from commit d4184065b6)
2016-04-08 18:43:18 +02:00
treeston
b2e4a962d9 Incorrect AI aggression as a consequence of the LineOfSight change, episode three, revenge of the special AIs. Also, hopefully the last. No original trilogy please.
(cherry picked from commit ab194d5ae3)
2016-04-08 18:43:03 +02:00
treeston
73b917e122 Merge remote-tracking branch 'Eliminationzx/FixJumpDestOrientation' into 3.3.5 (PR #16450) with some minor CS adjustments
(cherry picked from commit cfed2d7a3d)
2016-04-05 19:02:11 +02:00
Shauren
e6e3e799d0 Build fixes 2016-04-02 19:22:30 +02:00
DDuarte
75ff256cc4 Core/SAI: Typo fix of 77087db793
There's no %b, silly

(cherry picked from commit 7a252fc648)
2016-04-02 14:52:27 +02:00
DDuarte
252220ed6e Core/SAI: Code improvements to SMART_ACTION_RANDOM_SOUND
Warning fixes and extra sanity checks

Ref #16376

(cherry picked from commit 77087db793)
2016-04-02 14:52:15 +02:00
Lopfest
c457de1e80 Core/SAI: added SMART_ACTION_RANDOM_SOUND
Closes #16376

(cherry picked from commit e4af2baa7e)
2016-04-02 14:51:13 +02:00
Naios
bf33159a70 Core/Game: Converted the game library to a shared library.
* There is still the possibility to static link against game.
2016-03-24 01:31:51 +01:00
treeston
e2f2c70ba4 Merge branch '3.3.5-bossboundary' into 3.3.5-base (PR #16089)
(cherry picked from commit 5b8b8c6530)
2016-03-22 22:56:43 +01:00
Naios
28d8f7f70d CMake: Use inherited dependencies in scripts
* Removes the circular dependency between game <-> scripts

(cherry picked from commit 96bc31924a)
2016-03-19 23:19:54 +01:00
Naios
329225b40d Core/Game: Move singleton instances into compilation units
* Fixes issues when building shared libraries
  (prevents gcc and clang from providing several instance)
2016-03-11 18:35:49 +01:00
Shauren
db0b8bf24e Core/Maps: Changed the way area data is stored in maps, it now uses ID field from AreaTable.dbc instead AreaBit used for exploration marker (and is not unique anymore on top of simply being stupidly confusing)
Note: Extracting maps is required
2016-02-02 19:13:04 +01:00
jackpoz
2f1bd93c9e Core/Unit: Add Unit::KillSelf() overload
Add Unit::KillSelf() function as overload of Unit::Kill(this) . Use KillSelf() whenever the killer and the victim are the same to clearly state the Unit is going to kill itself.

(cherry picked from commit 3267c90102)

# Conflicts:
#	src/server/game/AI/SmartScripts/SmartScript.cpp
2016-01-15 20:34:27 +01:00
MitchesD
43d5d118b2 Core/Misc: fix warning and misc codestyle fixes
(cherry picked from commit 3b90b0368a)
2016-01-15 19:57:34 +01:00
Vincent-Michael
478cc756eb Update copyright note for 2016
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
Killyana
7e0a61c70b Merge pull request #15022 from robinsch/GOdespawn
SmartAI: Possibility to despawn object with SMART_ACTION_FORCE_DESPAWN
(cherry picked from commit 90c4304f1e)
2015-11-09 18:10:46 +01:00
Shauren
b09e63e9de Core/Conditions: Optimizations part 3 removed copying condition containers all over the place 2015-10-25 13:20:28 +01:00
Shauren
5e0cee85dd Core/Conditions: Type renaming 2015-10-25 10:59:58 +01:00
treeston
c64b71d01e Clean up SmartAI::MoveInLineOfSight. Remove tons of duplicate logic and forward to CreatureAI::MoveInLineOfSight instead of using its own (incorrect) implementation.
Move the removal of the 'distracted' state from SmartAI to UnitAI.cpp.

Fixes and closes #7197 and #15482.

(cherry picked from commit f446538cb1)
2015-10-16 12:37:42 +02:00
joschiwald
2bc4dea4da Core/Misc: renamed sGossipSelect parameters
(cherry picked from commit ad38c27124)

# Conflicts:
#	src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp
#	src/server/scripts/Kalimdor/zone_azshara.cpp
2015-10-16 11:56:53 +02:00
Shauren
cd27fd38b9 Core/Maps: Moved corpse management to map level 2015-09-28 17:20:27 +02:00
MitchesD
7b491046e9 Core/SmartScripts: SMART_ACTION_TALK - added action param 3 to set target as talk target (used for $vars in texts and whisper target)
* by default (action param 3 is 0), it will try to trigger talk of the target
2015-08-14 22:50:28 +02:00
MitchesD
e83a1c6b35 Core/SmartScript: removed initial timer of SMART_EVENT_IC_LOS and SMART_EVENT_OOC_LOS
Closes https://github.com/TrinityCore/TrinityCore/issues/14516
2015-08-05 16:50:55 +02:00
Rushor
58da855925 Core/SAI: Add SMART_ACTION_RISE_UP for Z Axis
* closes #15188
2015-07-30 10:37:02 +02:00
Vincent-Michael
2e586bc520 Core: Header cleanup in game/*/*.cpp 2015-07-25 20:18:42 +02:00
MitchesD
d68df33c76 Core/SmartScripts: added new action SMART_ACTION_COMBAT_STOP
* this avoid using hacks like evade, faction change or rooting. I wonder how SAI could be without this
2015-07-24 22:54:15 +02:00
DDuarte
7d9843c380 Core/Misc: Add a few consts to methods 2015-07-22 23:24:56 +01:00
Shauren
a22e4e121a Core/Misc: Fixing warnings detected by Visual Studio 2015 compiler 2015-07-21 00:33:36 +02:00
DDuarte
57da378dea Core/SAI: Fix some weird code in SmartAIMgr::IsTextValid
Additions to cb0e6cac63
2015-07-19 21:54:48 +01:00
DDuarte
cb0e6cac63 Core/SAI: Fix an issue in IsTextValid when using guids
Fixes #15122
2015-07-19 17:19:41 +01:00