Commit Graph
363 Commits
Author SHA1 Message Date
Shocker 91314b4cc3 Merge pull request #5743 from MrSmite/PetAI_2
Core/Pets: Fix the Attack button to stop flashing after combat end
2012-03-16 15:01:57 -07:00
MrSmite e0da136c36 Pet UI - Fix for "Attack" continues to flash after combat end
Closes 5551
2012-03-16 16:02:18 -04:00
MrSmite a26e145ae7 Fix for pets moving from stay during combat
Closes #5612
2012-03-16 15:53:07 -04:00
Machiavelli 03a24a84e4 Core/Units:
- Implement UNIT_FIELD_HOVERHEIGHT (requires DB data). This field, sent in update object packet, will determine the height at which a creature hovers if it has movementflag_hover applied. Note that hovering will now update the server-sided z-coordinate by the value of this field, and that all subsequent positional updates to the client will need to send z coordinate MINUS the hover height offset, or the hoverheight will be visually doubled client side.
- Correct our usage of movementflag_flying, movementflag_can_fly, movementflag_hover and movementflag_disable_gravity (previously levitate), and how they relate to InhabitType in the database. This fixes "flying creatures on steroids" bug (wings flapping too fast), and potentially a lot of visual issues in AI scripts. Note that a lot of scripts still set wrong movementflags, these need to be fixed on a case by case basis.
- Send correct packets for SPELL_AURA_FEATHER_FALL, SPELL_AURA_WATER_WALK and SPELL_AURA_HOVER apply/unapply.
- Send correct packet contents for movement update in Unit::SetSpeed.
- Misc. cleanup in affected scripts.
2012-03-12 00:53:45 +01:00
Nay 2b2d054f64 R.I.P SimpleAI
- Convert SimpleAI to (DB) SmartAI
- Spell ids corrected (and completed some of the scripts)
- Random cleanup (code style) in some scripts
2012-03-11 16:59:17 +00:00
Shauren f85fdbebe7 Core/DBC: Remove store getters (useless since we don't have scripts as external dll) 2012-03-10 20:53:26 +01:00
Discover- c4fd6b89db Core/SAI: SMART_ACTION_MOVE_TO_POS will now have param1 as PointId. This means you can now (properly) use SMART_EVENT_MOVEMENTINFORM when reaching the point you make the NPC move to.
Wiki is updated accordingly.
2012-03-03 23:41:29 +01:00
Subv b0985b4d5f Core/Misc: Remove redundant implicit template types in some std::make_pair calls. Should allow the build in Visual Studio 2011 2012-03-02 17:14:14 -05:00
Shauren 254256668b Core: Fixed compile without PCH 2012-03-01 23:45:07 +01:00
Shauren 09f0a2c04f Core/CreatureTextMgr: Added support for creature_text localization 2012-03-01 22:26:05 +01:00
Spp d38bc3a178 Core: Rename GetCreatureInfo to GetCreatureTemplate and minor cleanup here and there 2012-02-27 14:58:47 +01:00
Spp 3e622ee7ac Core: Minor cleanup in ObjectMgr and warning fixes 2012-02-27 11:08:34 +01:00
Shauren dc28b92415 Core: Random cleanup + compile fix 2012-02-23 13:01:16 +01:00
Venugh 5416b734e4 Core/Movement: Use SetLevitate(true/false) instead of AddUnit/RemoveUnit. 2012-02-23 12:32:21 +01:00
Venugh 1cac01b3df Core/Movement: Use SetWalk(true/false) instead of AddUnit/RemoveUnit. 2012-02-23 11:50:58 +01:00
Spp 1e246cb66c Fix build (gcc) and fix warnings 2012-02-22 09:15:57 +01:00
Subv 25d9e2ec29 Core/SAI: Implemented SMARTCAST_AURA_NOT_PRESENT as castflag, the spell will only be casted if the target does not have the aura
Signed-off-by: Subv <[email protected]>
2012-02-18 19:10:18 -05:00
click 5411e1ce52 Core: Clean up whitespace and tabs in the base sourcetree 2012-02-18 16:52:08 +01:00
QAston de706b3211 Core/Db/Conditions: Add new condition targets for:
- CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE ConditionTarget = 1 - check vehicle
- CONDITION_SOURCE_TYPE_VEHICLE_SPELL ConditionTarget = 1 - check vehicle
- CONDITION_SOURCE_TYPE_GOSSIP_MENU = 1 - check gossip provider
- CONDITION_SOURCE_TYPE_GOSSIP_MENU_OPTION = 1 - check gossip provider
2012-02-15 22:13:27 +01:00
Subv 8a72aede16 Codestyle: Renamed some variables to fit codestyle, corrected order in structure/class fields to match alignment (they use slightly less memory now)
Signed-off-by: Subv <[email protected]>
2012-02-14 12:46:26 -05:00
Subv 231b849ac4 Fixed build 2012-02-11 11:05:37 -05:00
Subv 5d93b33f0f Fixed codestyle from last commit 2012-02-11 10:53:33 -05:00
Subv c5e2e189de Core/Conditions: Allow to set SAI conditions to both the invoker and the object using ConditionTarget column.
ConditionTarget 0 = invoker
ConditionTarget 1 = object

Signed-off-by: Subv <[email protected]>
2012-02-11 10:49:28 -05:00
QAston 9d455c1e6f Fix build with GCC (it seems like it doesn't allow using references to temporary objects). 2012-02-11 00:15:05 +01:00
QAston ce4a4ffe50 Core/Db/Conditions: Add ContidionTarget column which allows selection of objects which will be checked by condition, depending on SourceTypeOrReferenceId.
So far usable only with CONDITION_SOURCE_TYPE_SPELL:
ContidionTarget = 0 - check caster
ContidionTarget = 1 - check explicit target
2012-02-10 23:42:08 +01:00
QAston 8713b44ee7 Core/Db/Conditions: Prepare conditions system to work on objects of different type than players.
Warning: API has changed a bit:
ConditionScript::OnConditionCheck(Condition* condition, Player* player, Unit* invoker) is now
ConditionScript::OnConditionCheck(Condition* condition, WorldObject* object, WorldObject* invoker)
2012-02-10 14:18:59 +01:00
Giuseppe Montesanto 9a3a6c7641 Fix a bug introdouced in recent commit. 2012-02-05 21:22:01 +01:00
Giuseppe Montesanto 14bc551862 Fix pet/guardian and other types of minion pet attack on targets with Crowd Controls. 2012-02-04 14:59:17 +01:00
Shocker 08be716ef8 Core/Misc: Rename UNIT_STAT_* enums to UNIT_STATE_* 2012-02-03 19:02:17 +02:00
Subv2112 229d4119e8 Core/SAI: Fixed SMART_ACTION_SET_INVINCIBILITY_HP_LEVEL
Signed-off-by: Subv <[email protected]>
2012-02-02 14:35:45 -05:00
Subv2112 74b64150bb Core/Conditions: Implemented SAI conditions, only usable with events in which the invoker is a player.
sourceType = 22
sourceEntry = entryorguid
sourceGroup = eventId + 1
sourceId = SAI sourceType (0 = creature, 1 = gameobject, etc)

Also refactored some code

Signed-off-by: Subv2112 <[email protected]>
2012-01-29 13:49:19 -05:00
Subv2112 e43b1cd750 Core/SAI: Run mode should not be set to true each time a creature resets, it should use its previous value
Signed-off-by: Subv2112 <[email protected]>
2012-01-27 08:34:36 -05:00
click e6d5b21778 Core: Fix non-PCH build and remove a few warnings. 2012-01-24 00:24:39 +01:00
Subv2112 3d4f55723c Core/SAI: Linked events should be executed after the event that linked them is executed.
Core/SAI: Allow SMART_EVENT_GO_STATE_CHANGED to use ActionInvoker target

Signed-off-by: Subv2112 <[email protected]>
2012-01-22 20:36:01 -05:00
Shauren 94c27e3cce Core/SmartAI: Fixed SMART_ACTION_SEND_TARGET_TO_TARGET for gameobject targets 2012-01-22 16:56:55 +01:00
Subv2112 c24248fabd Core/SAI: Allow SMART_ACTION_SEND_TARGET_TO_TARGET to target multiple targets at once, thanks Shauren 2012-01-22 10:46:32 -05:00
Subv2112 8e8be7e358 Core/SAI: CAST_AI will return NULL if the cast was not successful, no need to check for AIName, thanks Shauren 2012-01-22 10:42:13 -05:00
Subv2112 f4778a6b72 Core/SAI: Add the new action_types to the IsEventValid case check 2012-01-22 10:02:31 -05:00
Subv2112 8362e21b2a Merge branch 'master' of https://github.com/TrinityCore/TrinityCore 2012-01-22 08:04:39 -05:00
Subv2112 a3f595ee10 Core/SAI: Implemented SMART_ACTION_SEND_TARGET_TO_TARGET, it can be used to send targets previously stored with SMART_ACTION_STORE_TARGET, to another npc, the other npc can then access them as if it was its own stored list
Signed-off-by: Subv2112 <[email protected]>
2012-01-22 07:54:32 -05:00
Vincent-Core c37afafbbf Core/SmartAI: Fix target type SMART_TARGET_INVOKER_PARTY 2012-01-22 01:49:53 +01:00
Subv2112 07b1101a63 Core/SAI: Run mode should be disabled by default in creatures with SAI
Signed-off-by: Subv2112 <[email protected]>
2012-01-21 18:54:05 -05:00
Machiavelli dbbac0bdaa Core/Movement: Implement spline movement subsystem.
Spline movement controls movements of server-side controlled units (monster movement, taxi movement, etc).
Proper implementation of effects such as charge, jump, cyclic movement will rely on it.
However, need improve our states system before.

Technical changes:

* Added linear, catmullrom and bezier3 splines which based on client's algorthims. They can be reused for proper transport position interpolation.
* Precission increased. There are no more position desync issues since client's position calculation formulas used.
* Now possible to move by paths with multiple points, send whole path to client.

--
Original author of research and implementation: SilverIce. Massive kudos.
Original port for Trinity (ref #4629) Chaplain and Venugh
With the following incremental fixes during my review:

- Restore flightmaster end grid pre-loading
- Fix uninitialized Creature::m_path_id
- Add missing trinity_string entries for .movegens command
- Fix a bug in WaypointMovementGenerator that would trigger unexpected pausing at waypoints for various amounts of time

Known issues:
- Errors like WaypointMovementGenerator::LoadPath creature XXX (Entry: YYYYY GUID: ZZZZZZ) doesn't have waypoint path id: 0.
This is caused by bad DB data. This commit didn't "break" it.

Do not forget to re-run CMake before compiling.
2012-01-14 15:36:07 +01:00
Valcorb ed27fb6d7d Update the rest of the headers 2012-01-13 16:58:48 +01:00
Machiavelli 5a504f94f7 Merge pull request #4700 from Subv/fix001
Core/SAI: Implement SMART_EVENT_GO_STATE_CHANGED and SMART_ACTION_GO_SET_LOOT_STATE
2012-01-07 11:24:53 -08:00
Subv2112 ddb4f0ce5b Core/Build: Fixed compile 2012-01-07 13:20:59 -05:00
Subv2112 3c4678085c Core/SAI: Removed unused variable: mResumeActionList
Signed-off-by: Subv2112 <[email protected]>
2012-01-06 22:31:38 -05:00
Subv2112 a40839fd7b Core/SAI: Changed SMART_ACTION_CALL_TIMED_ACTIONLIST params, now it has only 2, id and timerType
Signed-off-by: Subv2112 <[email protected]>
2012-01-06 22:29:26 -05:00
Subv2112 15d8763478 Core/SAI: Fixed the crash with using SMART_ACTION_ATTACK_START inside a TimedActionList, closes #4650
Signed-off-by: Subv2112 <[email protected]>
2012-01-06 22:24:11 -05:00
Subv2112 7f977c28b6 Core/SAI: Fixed the behaviour of SmartAI::RemoveAuras, it should only remove the auras that are applied on the unit by casters other than the unit
Signed-off-by: Subv2112 <[email protected]>
2012-01-06 20:50:05 -05:00