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 <s.v.h21@hotmail.com >
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
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 <s.v.h21@hotmail.com >
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 <s.v.h21@hotmail.com >
2012-01-29 13:49:19 -05: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 <s.v.h21@hotmail.com >
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
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 <s.v.h21@hotmail.com >
2012-01-22 07:54:32 -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
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 <s.v.h21@hotmail.com >
2012-01-06 22:31:38 -05:00
Subv2112
15d8763478
Core/SAI: Fixed the crash with using SMART_ACTION_ATTACK_START inside a TimedActionList, closes #4650
...
Signed-off-by: Subv2112 <s.v.h21@hotmail.com >
2012-01-06 22:24:11 -05:00
Subv2112
aaa255b83d
Core/SAI: Implemented SMART_EVENT_GO_STATE_CHANGED and SMART_ACTION_GO_SET_LOOT_STATE
...
Signed-off-by: Subv2112 <s.v.h21@hotmail.com >
2012-01-06 11:09:01 -05:00
Subv2112
7b094faa85
Core/SAI: SMART_ACTION_MOVE_TO_POS should not overwrite the effects of SMART_ACTION_SET_RUN
...
Signed-off-by: Subv2112 <s.v.h21@hotmail.com >
2012-01-03 16:13:34 -05:00
kiper
8299627ed9
Update headers for 2012. HAPPY NEW YEAR!!!
2012-01-01 00:32:13 +01:00
leak
ded31adfa1
Core/SAI: Restore build
2011-12-30 19:01:22 +01:00
Subv2112
bbfb21022f
Fixed compile, thanks Lopin for pointing out
2011-12-28 07:10:59 -05:00
Subv2112
d7266c3cae
Core/SAI: Added also SMART_TARGET_OWNER_OR_SUMMONER to SMART_ACTION_MOVE_TO_POS.
...
Codestyle
Signed-off-by: Subv2112 <s.v.h21@hotmail.com >
2011-12-27 20:37:42 -05:00
Subv2112
645a10d76f
Core/SAI: Added support for SMART_TARGET_CREATURE_RANGE, SMART_TARGET_CREATURE_GUID, SMART_TARGET_CREATURE_DISTANCE, SMART_TARGET_GAMEOBJECT_RANGE, SMART_TARGET_GAMEOBJECT_GUID, SMART_TARGET_GAMEOBJECT_DISTANCE, SMART_TARGET_CLOSEST_CREATURE and SMART_TARGET_CLOSEST_GAMEOBJECT in SMART_ACTION_MOVE_TO_POS
...
Signed-off-by: Subv2112 <s.v.h21@hotmail.com >
2011-12-27 20:25:50 -05:00
Machiavelli
6c03bf9535
Core/Misc: Some random meaningless Engrish to English conversion in a method name because Discovered is too lazy to do it himself.
2011-12-19 22:06:29 +01:00
Machiavelli
1b2c413933
Core/SAI: Preliminary implementation of SMART_EVENT_GAME_EVENT_START and SMART_EVENT_GAME_EVENT_END {param1: game_event.entry}
2011-12-11 16:23:43 +01:00
kaelima
b10477a166
Core/SmartAI: Fixed crashes when using timed actionlist for gameobjects.
2011-12-10 13:44:06 +01:00
Machiavelli
f5b3553bb3
Core/SAI: Typo in second param of SMART_ACTION_SEND_GOSSIP_MENU. This is npc_text_id, not gossip_option_id. Wiki needs to be updated accordingly.
...
Thanks to Prodigy for pointing out.
2011-12-06 12:37:05 +01:00
Shauren
638693e78f
Core: Fixed more warnings (C6246: Local declaration of 'x' hides declaration of the same name in outer scope.)
2011-11-23 17:55:16 +01:00
kaelima
17e1f8a0d5
Core/SmartAI: Remove the requirement for only players to trigger SMART_ACTION_SOUND.
...
Closes #517
2011-11-13 06:40:14 +01:00
kaelima
bfdceaf07e
Core/SmartAI: Initialized player pointer before use
...
Should fix #3757
2011-10-31 13:35:06 +01:00
kaelima
3d4d147196
Core/SmartAI:
...
- Drop useless actions SMART_ACTION_ENTER_VEHICLE, SMART_ACTION_LEAVE_VEHICLE and SMART_ACTION_REMOVE_PASSENGERS.
(Vehicles are aura-driven, just remove or add the proper aura to achieve the same as these actions did)
- Fixed possible crash in SMART_ACTION_SEND_GOSSIP_MENU
- Areatriggers should not be triggered by dead players
2011-10-31 02:01:17 +01:00
Nay
0b51b4ef0a
Core/SAI: SMART_ACTION_TALK, if our action target is a player, use its guid as whisperGuid (used in whispers and in text $vars)
2011-10-30 14:26:49 +00:00
kaelima
f958fdf246
Core/SmartAI: Add actions SMART_ACTION_LEAVE_VEHICLE and SMART_ACTION_REMOVE_PASSENGERS.
...
Fix maxdist for SMART_TARGET_CLOSEST_PLAYER.
2011-10-25 23:50:00 +01:00
kaelima
6ca1487c48
Core/SmartAI: Fix target type SMART_TARGET_CLOSEST_PLAYER
2011-10-25 21:43:24 +01:00
kaelima
3a3af64f68
Core/SmartAI:
...
- Fixed some issues with SMART_ACTION_SET_FLY (#1073 )
- Fixed allowing 0 as input for SMART_EVENT_ACCEPTED_QUEST and SMART_EVENT_REWARD_QUEST (#2680 )
- Some cleanup
2011-10-24 23:21:34 +01:00
Shocker
ce034bd544
Core/SmartAI: Delay spell cast events (SMART_ACTION_CAST) when another spell is already being casted.
...
Idea by ET
2011-10-23 21:34:50 +03:00
Geekotron
c2125ece3b
Core/SAI: Add SMART_ACTION_SEND_GOSSIP_MENU.
...
It allows the scripter to change the gossip (and gossip menu option) of a creature with SAI
Param1 = `gossip_menu`.`entry`
Param2 = `gossip_menu_option`.`id`
2011-10-23 12:59:08 +01:00
kaelima
be0b2fcf97
Core/Grid:
...
- Simplified CellArea calculation (Original author: SilverIce)
- Removed unused code in Cell class (Original author: SilverIce)
- Improve some Visit functions.
2011-10-19 17:40:44 +01:00
megamage
c29ff41001
Rename some classes in grid system.
...
Note: The naming of classes is still confusing. "cell" usually refers to class "Grid", and "grid" usually refers to class "NGrid". But it requires a lot of changes to clean this up.
2011-10-18 10:53:34 -04:00
Rat
e23fe1845f
Core/SmartAI: Updated SMART_ACTION_RESPAWN_TARGET, should work for GOs as intented. Param1 is to set GO respawn time.
2011-10-07 14:12:09 +02:00
Spp
b16d2245bb
Cosmetic: Multiple cosmetic changes
...
- Added missing space to 'if', 'for', 'while' and 'switch' when it's followed by '('
- Added missing space after a comma and remove space before comma (with some exceptions)
- Remove trailing spaces
- Convert tab to spaces
Note: Only affects files with extension "cpp" and "h" under /src/server
2011-09-29 12:43:05 +02:00
Rat
0ab9dd3f9f
Core/SmartAI: Re-apply accidentally removed crash fix, whoops
2011-09-20 17:56:47 +02:00
Rat
41ad855bdf
Core/SmartAI: fixed SMART_ACTION_SOUND, note: target(s) must be player(s)
...
Signed-off-by: Rat <gmstreetrat@gmail.com >
2011-09-20 17:46:40 +02:00
megamage
c9a4efdf8f
Fix crash caused by invalid talker in SmartScript. Solve #3082 .
2011-09-19 09:24:59 -04:00
Nay
3ccfb5fefb
Core/SAI: SMART_ACTION_FLEE: print flee emote if param1 is set
2011-09-04 18:51:16 +01:00
Spp-
aa85553bfd
Core: Crash fix (TemporarySummon), remove some warnings and some other minor changes
...
- "const uint64" and "uint64 const" --> uint64
- Add some info in LFGDungeonEntry
- Move some definitions from ".h" files and move to ".cpp"
2011-08-30 13:46:36 +02:00
Fredi Machado
73b1448f29
Core/AI: English correction thanks u2blah for pointing
2011-08-21 00:07:38 -03:00
Fredi Machado
78e10e9cd0
Core/AI: Cleaning up hungarian notation
2011-08-20 20:31:31 -03:00
Spp
7e53a73059
Core/Vehicles: Remove Vehicle.h dependency from other header files
2011-08-03 12:28:42 +02:00