Commit Graph

881 Commits

Author SHA1 Message Date
ariel-
83c032c2a8 Core/SmartAI: fix warning reported by VS2015 2016-08-23 21:54:18 -03:00
SnapperRy
1fcd03b60a 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
2016-08-24 00:13:26 +02:00
SnapperRy
a6ef9d4539 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
2016-08-23 23:46:24 +02:00
treeston
ba4d6f6393 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. 2016-08-19 23:01:21 +02:00
treeston
9072e0221b 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. 2016-08-19 15:23:19 +02:00
treeston
14b44af38d AI/SmartScripts: Add SMART_ACTION_DISABLE_EVADE (117). 2016-08-19 14:53:53 +02:00
treeston
e2c915fb43 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.
2016-08-19 14:25:23 +02:00
Aokromes
b51409a5d3 Core/Logs: Fine tunning some logs 2016-08-05 21:22:12 +02:00
treeston
152b3ad5b9 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.
2016-08-05 12:41:56 +02:00
treeston
4030e4d780 ScriptedAI/Creature: Fix a bug where a std::chrono overload was counting milliseconds instead of seconds. 2016-08-04 15:32:24 +02:00
ariel-
62bfee37cb 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)
2016-07-30 18:50:44 -03:00
ForesterDev
a2495002e5 Core/UnitAI: Removed unneccessary null checks in SpellTargetSelector. CID 1357405 (#17630) 2016-07-19 11:40:57 +02:00
ccrs
b008b677ad Core/UnitAI: #17309 follow-up (#17608)
* Core/UnitAI: SelectTarget correction

Set CurrentVictim as first element on targetList if necessary, which is then filled with the threatlist elements that satisfy the predicate.
2016-07-18 20:30:58 +02:00
Gustavo
f826ecb4b2 Core/AI Prevent bosses respawn when BossState is set to DONE (#17616) 2016-07-18 12:35:11 +02:00
ccrs
63e62117ea Core/UnitAI: SelectTarget correction (#17309)
Core/UnitAI: SelectTarget correction - have current victim always be first element of target list
2016-07-17 01:12:57 +02:00
SnapperRy
ba0cb53b02 Core/SmartAI: change SMART_ACTION_RISE_UP (114) to SMART_ACTION_MOVE_OFFSET and implement offset movement via target fields. (#17362) 2016-07-15 18:37:17 +02:00
Shauren
14b93c04ee Core/Units: Fixed autoattack range
Closes #17539
2016-07-09 13:03:03 +02:00
treeston
0547926f17 Entities/Creature: Add some more std::chrono overloads 2016-07-08 17:02:34 +02:00
ariel-
d1d0c64ad1 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)
2016-06-14 17:29:51 +01:00
mik1893
b0e7b45840 Merge pull request #17281 from SnapperRy/delay_flee_for_assist
Core/SmartAI: delay SMART_ACTION_FLEE_FOR_ASSIST if creature is rooted or stunned
2016-06-09 12:01:26 +01:00
Snapper
aaf10dccb0 Core/SmartAI: delay SMART_ACTION_FLEE_FOR_ASSIST if creature is rooted/stunned.
Prevents creatures from teleporting around when fleeing while stunned/rooted.
2016-06-04 21:17:15 +02:00
treeston
123e45c119 AI/SmartScripts: Add action_param3 "disablePathfinding" to SMART_ACTION_MOVE_TO_POS (69). 2016-06-04 00:51:19 +02:00
treeston
2d2544fab0 AI/PlayerAI: Fix potential edge case crash. 2016-06-03 17:57:05 +02:00
jackpoz
6007f2a6a0 Merge pull request #17259 from SnapperRy/smart_ai
Core/SmartAI: Allow SMART_ACTION_FORCE_DESPAWN on no-SmartAI GameObjects
2016-06-02 00:31:32 +02:00
treeston
321d35417d Build fix for horrendous, outdated, non-standards-compliant compilers. Such as the one in VS 2013. I hate VS 2013.
Closes #17260.
2016-06-01 19:41:35 +02:00
Snapper
9803e58392 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.
2016-06-01 13:41:58 +02:00
treeston
e3aa19281f AI/PlayerAI: Code style cleanup. 2016-05-31 22:18:26 +02:00
treeston & Keader
25c5570f47 AI/PlayerAI: Finally implement cast logic for controlled players. 2016-05-31 15:05:35 +02:00
ForesterDev
fb0881398a Core: updated creature type flags enum (#17128)
Core/Misc: Update CreatureTypeFlags enum according to TrinityCoreWiki
2016-05-26 10:56:50 +02:00
treeston
6040e30fa3 Allow BossAI::_DespawnAtEvade to work on creatures other than the boss itself (optional argument). 2016-05-13 22:24:01 +02:00
treeston
b52a6b8570 This discussion is more effort than it takes to change it. 2016-05-12 21:42:31 +02:00
treeston
ab0abdbde5 Core/AI: Add DoCastSelf helper.
(I have no idea why I never bothered to do this before, really. It had crossed my mind a few times.)
2016-05-12 18:46:12 +02:00
treeston
b7f2c87d37 Creature/CreatureAI:
- Default range for DoZoneInCombat: 50.0f -> 250.0f.
- Add optional second arg to SummonList::DoZoneInCombat to specify range.
- Also a bunch of random NULL -> nullptr cleanup.
2016-05-11 23:24:26 +02:00
Naios
f50c4b71a1 Core/Game: Remove some unnecessary export macros 2016-05-10 19:22:22 +02:00
treeston
59ac775223 Merge branch '3.3.5-evademore' into 3.3.5 (PR #16834) 2016-05-05 13:20:52 +02:00
treeston
26b084a90f 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. 2016-05-03 13:23:18 +02:00
Rushor
e869ccb297 Merge pull request #16503 from Rushor/evading
[3.3.5][6.x]Core/Unit: Do not remove auras from Pets and Guardians after evading
2016-04-25 11:46:00 +02:00
jackpoz
3e73ba9da5 Core/Misc: Fix issues reported by static analysis 2016-04-23 18:20:18 +02:00
lafoniz
a05a871d7c Core/SmartScripts: Improve SMART_EVENT_DISTANCE_CREATURE so it can be used with SMART_TARGET_ACTION_INVOKER
Closes #16752
2016-04-23 14:45:05 +02:00
Chaouki Dhib
dc3327f9c5 Core/Movement: Clean up and improvements on Unit::SetSpeed (#16843)
- Clean up of Unit::SetSpeed (mostly cherry picks from the 6.x branch):
- the opcode sent depends on the unit. until now, MSG_MOVE_SET_* were sent for every units which isn't like retail behavior.
- Removed the unused method parameter "forced" from Unit::SetSpeed
- Renamed Unit::SetSpeed to SetSpeedRate
- Removed the unused method parameter "forced" from Unit::UpdateSpeed
- Added utility method Unit::SetSpeed which take the new flat value.
2016-04-16 01:36:32 +02:00
treeston
7b1560fccb 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.
2016-04-10 19:49:40 +02:00
Shauren
e52878b6b5 Core/Spells: Renamed EnsureSpellInfo to AssertSpellInfo to minimize differences between branches 2016-04-02 17:05:46 +02:00
sirikfoll
acf6681353 Core/AI Remove Reset() call from JustRespawned() hook
* Not needed, and causes trouble when using _DespawnAtEvade()
* Closes #16786
2016-03-24 14:31:53 +01:00
Naios
9f61b72679 Core/Game: Converted the game library to a shared library.
* There is still the possibility to static link against game.

(cherry picked from commit bf33159a70)
2016-03-24 02:46:42 +01:00
treeston
21cfacfba7 Entities/Pet: Finally fix pets spamming Blood Pact/Fel Intelligence in some scenarios. Your eardrums will thank me. 2016-03-23 18:09:33 +01:00
Naios
96bc31924a CMake: Use inherited dependencies in scripts
* Removes the circular dependency between game <-> scripts
2016-03-18 02:53:00 +01:00
Vincent-Michael
5e74c2223b Core: Remove whitespaces 2016-03-16 21:40:15 +01:00
Golrag
00c5eb70f2 Scripts/Icecrown Citadel: Fixed Sindragosa ice tomb targets
* Also changed the way NonTankTargetSelector checks who is the tank.
2016-03-13 11:21:03 +01:00
RelevantJesse
55bb3fb00c Update PetAI.cpp
Pulled check for IsReady to outside of the IsPositive check

(cherry picked from commit a71ea54a3a)
2016-03-12 23:54:24 +01:00
Naios
b7f936891a Core/Game: Move singleton instances into compilation units
* Fixes issues when building shared libraries
  (prevents gcc and clang from providing several instance)

(cherry picked from commit 329225b40d)
2016-03-11 20:03:12 +01:00