Commit Graph
151 Commits
Author SHA1 Message Date
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
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 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
Traesh 01ded93a42 Core/AI: enable SmartScripts on Scenes + add scene related actions/events
Closes #19194
2017-03-17 21:21:35 +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 e69a483aa942c1c6c4bd9b5fa47139f89643b8d5)

Derp. Build fix.
(cherry picked from commit 9180bcd404ff0a89144bbe834a2efe189bd0eb86)
2017-02-26 15:30:15 +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
treeston b18b05ee4a AI/SmartScripts: Add SMART_ACTION_DISABLE_EVADE (117).
(cherry picked from commit 14b44af38d33be0cab4cb081c1f911b20db8884c)
2017-02-12 15:46:58 +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
ForesterDev 5c2705fadc Core: updated creature type flags enum (#17128)
Core/Misc: Update CreatureTypeFlags enum according to TrinityCoreWiki
(cherry picked from commit fb0881398a106806fad48abe9ffd600e0caf175d)

# 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 7b1560fccba77ecbdfecd7b33af740aea41b7087)
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 26b084a90ff3e4f0601e72c283bd3296d4640585)

align fix
(cherry picked from commit 58486fc19ad51eaff2ef1a4a5ddd8edfdedec28d)
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
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
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 e869ccb29793aa0dd39dc2ecef9f11ab56ba010e)
2016-04-28 17:20:40 +01:00
treeston 9e07adccf4 I don't like drycoding. It's coarse and rough and irritating and it gets everywhere.
(cherry picked from commit d4184065b6d51b250ab08f35e88868cef631ed4b)
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 ab194d5ae3b9812ebd5c8f56559e85f1441cf857)
2016-04-08 18:43:03 +02:00
treeston e2f2c70ba4 Merge branch '3.3.5-bossboundary' into 3.3.5-base (PR #16089)
(cherry picked from commit 5b8b8c653039ec2add0b3a66468abb85e6f35054)
2016-03-22 22:56:43 +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
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 f446538cb16dad3dcd04e79aebc944feefc16275)
2015-10-16 12:37:42 +02:00
joschiwald 2bc4dea4da Core/Misc: renamed sGossipSelect parameters
(cherry picked from commit ad38c2712460fe9d3ecb71959294655d2b88799d)

# 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
Vincent-Michael 2e586bc520 Core: Header cleanup in game/*/*.cpp 2015-07-25 20:18:42 +02:00
mik1893 fa0e5289a8 Merge pull request #14974 from pete318/stealth_work
Stealth changes (Player stealthed vs NPCs) - 3.3.5
(cherry picked from commit 90fcfb3f2d71e15d162cb52b915b53a11bc42212)

Conflicts:
	src/server/game/Entities/Object/Object.h
	src/server/game/Entities/Unit/Unit.cpp
2015-07-19 01:43:05 +01:00
Carbenium 9b6ccdc49f Merge pull request #15023 from robinsch/combatMovement
SmartAI: Incorrect removal of movement at SetCombatMove
(cherry picked from commit a6f7bb029c8d29c19de8596d5d402222ca6c00a2)
2015-07-12 12:47:53 +01:00
MitchesD c6d3b0f250 Merge pull request #14838 from Rushor/stop
Scripts/SmartScripts: Clear Movement on Death
(cherry picked from commit f166dc3cab3f5325984c9f0fcf9ed1406ae6eae6)
2015-06-26 03:23:59 +01:00
Golrag d999caee67 Core/AreaTrigger: Added 'bool entered' to OnTrigger 2015-04-18 11:22:30 +02:00
Vincent-Michael ab90f74486 Update copyright note for 2015
Happy new year
2015-01-01 00:28:09 +01:00
Intel 5f2b5a325b Core/DataStores: Updated AreaTrigger.dbc struct 2014-11-06 01:13:06 +02:00
Shauren 9cc7044546 Core/Entities: First batch of removing implicit conversions of ObjectGuid to uint64 2014-10-21 19:23:32 +02:00
Kinzcool bc97908822 Core/Defines: Updated some enums to build 6.0.2.18988
* Fixed build
2014-10-06 18:37:38 -04:00
Shauren a3d8f1d879 Core/Scripts: Fixed build of boss_* scripts 2014-09-15 22:07:11 +02:00
Shauren 6ce0a3107d Core/Scripts: Changed GetGUID/SetGUID script hooks to operate on ObjectGuid class
Fixed compile for boss scripts starting with letters B, C and D
2014-09-15 00:23:47 +02:00
Shauren a0e50ea35f Core/Entities: Use ObjectGuid class in game project 2014-09-14 16:14:12 +02:00
DDuarte df3b08d140 Core/Server: Use nullptr instead of 0 where pointers are expected 2014-08-09 21:32:26 +01:00
Subv 1320c9f8d6 Core/SmartAI: Allow the use of SMART_ACTION_SET_EVENT_PHASE with SMART_EVENT_RESPAWN.
Closes #9289
2014-06-24 23:01:12 -05:00
Ascathor 6949735098 Core/Misc:
* Fix some codestyle, fix some typos

* Change CMakeLists for: Custom (can be uncommented), Events, World
** Custom is theoretically unchanged. You can, however, uncomment the glob_recurse that initializes every file within. This might be easier for beginners.

* Introducing the IP Based Action Log System:
** On several different actions, e.g. Login, Character Login, etc., a new entry is added
** Can be logged on and off in worldserver config
*** Disabled by default to prevent increased log db size for unknowing users.

* Add a new row to account table called 'last_attempt_ip'
** Lists the last ip trying to connect to the account

* Add a new type of HookScripts: AccountScript
** Includes: OnAccountLogin, OnFailedAccountLogin, OnEmailChange, OnFailedChange, OnPasswordChange, OnFailedPasswordChange

* Added new Hook to PlayerScripts: OnFailedPlayerDelete

* Added new variables to PlayerScripts: OnPlayerDelete
2014-06-13 16:25:11 +02:00
jackpoz 1083dbb993 Core/Misc: Remove Unit::Get* wrappers for ObjectAccessor::Get* 2014-05-20 21:21:33 +02:00
jackpoz d36ecbf4a3 Merge pull request #12076 from Trisjdc/even_more_sai
Core/SAI: Clear UNIT_STATE_EVADE immediately if we're about to follow a target on EnterEvadeMode
2014-05-19 22:00:48 +02:00
Trisjdc 9bad26fc88 Core/SAI: Clear UNIT_STATE_EVADE immediately if we're about to follow a target on EnterEvadeMode (MoveFollow does not clear evade) 2014-05-16 19:46:02 +01:00
Trisjdc 50336af1c7 Core/SAI: Prevent nullifying damage, because of player damage requirements 2014-05-15 17:05:02 +01:00
Kinzcool c536305e3a Core: Droped faction_H field -- only one faction table is necessary 2014-04-27 18:13:55 -04:00
jackpoz 2585e799f9 Core/Misc: Change how Position struct is retrieved
Update Position::GetPosition() and similar methods signatures to reflect 2a4c9bcaf9 changes by return a Position object instead of accepting a Position parameter by reference.
2014-04-25 21:19:30 +02:00
jackpoz 8ca6371793 Core/Misc: Ensure GetVictim() returns a valid reference when expected
Add a new method EnsureVictim() which asserts a valid not NULL reference will be returned to the caller. Use this whenever the GetVictim() would be dereferenced .
2014-04-19 21:48:22 +02:00
Gacko 7630b3c627 SmartAI: Use same method for removing auras in EnterEvadeMode as in CreatureAI
Also fixes warnings about duplicate auras. Self-casted auras were not removed on entering evade mode in SAI as they are in CreatureAI.
2014-03-30 15:05:04 +02:00
joschiwald 7ec7fcf78c Core/SAI: drop unneeded code 2014-01-10 17:36:04 +01:00
Vincent_Michael 20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
Shauren 8bcde41538 Core/Quests: Added stuff missing in previous commit 2013-12-25 12:17:23 +01:00
Discover- 20a22662df Core/SAI: Using SMART_ACTION_SET_FOLLOW with target_type 0 (SMART_TARGET_NONE) will now stop the following completely. Fixes 6 scripts in a clean TDB already using this functionality even though it wasn't implemented. 2013-12-17 10:12:23 +01:00
jackpoz 1c0903e286 Core/Misc: Fix some static analysis issues
Fix some static analysis issues about uninitialized values. Most of them are false positives, always initialized before being accessed, while some of them are real issues spotted by valgrind too.
2013-12-14 18:41:26 +01:00