Nay
7776016106
Core/Quests: Remove CastedCreatureOrGO method
...
- Remove EAI's ACTION_T_CAST_EVENT and ACTION_T_CAST_EVENT_ALL
- Remove SAI's SMART_ACTION_CALL_CASTEDCREATUREORGO
- Split QUEST_TRINITY_FLAGS_KILL_OR_CAST into QUEST_TRINITY_FLAGS_KILL and QUEST_TRINITY_FLAGS_CAST
- Assign QUEST_TRINITY_FLAGS_CAST to all the quests that were using RequiredSpellCastX
- (unrelated) Fix a warning in Player.cpp
- Replace CastedCreatureOrGO usage in scripts by KilledMonsterCredit
TODO: Convert the two EAI scripts commented out in the .sql to proper SAI
Closes #10667
2013-08-30 19:32:08 +01:00
Nay
aa5bc37e9c
Core: Yet more warning fixes
2013-08-30 16:03:37 +01:00
Nay
ec837b1d7d
Merge pull request #10666 from xjose93/SmartScripts-StartEvent
...
Implement SMART_ACTION_GAME_EVENT_STOP (111) and SMART_ACTION_GAME_EVENT_START (112).
2013-08-29 16:36:42 -07:00
xjose93
c3afc00571
Implement SMART_ACTION_GAME_EVENT_STOP (111) and SMART_ACTION_GAME_EVENT_START (112).
2013-08-30 01:23:01 +02:00
Kirkhammett
c84f545708
Core/SmartAI: Add passive check for WP movement
2013-08-29 14:35:22 +02:00
Nay
2050a36b58
SAI & Scripts: Fix unitialized values found by Valgrind
...
==3064== Conditional jump or move depends on uninitialised value(s)
==3064== at 0x19B3031: boss_skarvald_the_constructor::boss_skarvald_the_constructorAI::UpdateAI(unsigned int) (boss_skarvald_dalronn.cpp:217)
==3064== Conditional jump or move depends on uninitialised value(s)
==3064== at 0x19B3948: boss_dalronn_the_controller::boss_dalronn_the_controllerAI::UpdateAI(unsigned int) (boss_skarvald_dalronn.cpp:388)
==3064== Conditional jump or move depends on uninitialised value(s)
==3064== at 0x15E2FCC: SmartScript::ProcessAction(SmartScriptHolder&, Unit*, unsigned int, unsigned int, bool, SpellInfo const*, GameObject*) (SmartScript.cpp:144)
==3064== Conditional jump or move depends on uninitialised value(s)
==3064== at 0x191CB98: dummy_dragonAI::UpdateAI(unsigned int) (boss_sartharion.cpp:961)
==3064== by 0x191D242: npc_shadron::npc_shadronAI::UpdateAI(unsigned int) (boss_sartharion.cpp:1122)
==3064== Conditional jump or move depends on uninitialised value(s)
==3064== at 0x19AE913: boss_ymiron::boss_ymironAI::UpdateAI(unsigned int) (boss_ymiron.cpp:215)
==3064== Use of uninitialised value of size 8
...
==3064== by 0x18A9F4A: boss_illidan_stormrage::boss_illidan_stormrageAI::Reset() (boss_illidan.cpp:1805)
==3064== Conditional jump or move depends on uninitialised value(s)
...
==3064== by 0x18A9F4A: boss_illidan_stormrage::boss_illidan_stormrageAI::Reset() (boss_illidan.cpp:1805)
==3064== Conditional jump or move depends on uninitialised value(s)
==3064== at 0x191CB98: dummy_dragonAI::UpdateAI(unsigned int) (boss_sartharion.cpp:961)
==3064== by 0x191CE88: npc_tenebron::npc_tenebronAI::UpdateAI(unsigned int) (boss_sartharion.cpp:1027)
==3064== Conditional jump or move depends on uninitialised value(s)
==3064== at 0x191CB98: dummy_dragonAI::UpdateAI(unsigned int) (boss_sartharion.cpp:961)
==3064== by 0x191D5B8: npc_vesperon::npc_vesperonAI::UpdateAI(unsigned int) (boss_sartharion.cpp:1220)
==3064== Conditional jump or move depends on uninitialised value(s)
...
==3064== by 0x1868F59: boss_lady_vashj::boss_lady_vashjAI::Reset() (boss_lady_vashj.cpp:206)
==3064== Conditional jump or move depends on uninitialised value(s)
==3064== at 0x191C14C: dummy_dragonAI::MovementInform(unsigned int, unsigned int) (boss_sartharion.cpp:802)
==3064== Conditional jump or move depends on uninitialised value(s)
==3064== at 0x1046986: Position::NormalizeOrientation(float) (Object.h:388)
...
==3064== by 0x17D9463: boss_malchezaar::boss_malchezaarAI::SummonInfernal(unsigned int) (boss_prince_malchezaar.cpp:373)
2013-08-26 16:13:26 +01:00
joschiwald
2b19ba1879
Misc: replace Unit::GetPlayer with ObjectAccessor::GetPlayer and some cosmetic changes
2013-08-18 01:41:10 +02:00
Discover-
a0ff0233c5
Core/SmartAI: Implement SMART_TARGET_CLOSEST_FRIENDLY.
...
Parameter is distance to search for.
Closes #10521
2013-08-15 01:22:22 +01:00
Discover-
8c961687a0
Core/SmartAI: Implement SMART_EVENT_FRIENDLY_HEALTH_PCT.
...
On current clean TDB, there are a total of 106 creatures using
SMART_EVENT_FRIENDLY_HEALTH (non-PCT) which has a flat first parameter, but
only 8 of these use the event correctly (and therefore only 8 of them
actually work).
Closes #10520
2013-08-15 01:18:10 +01:00
Kirkhammett
faa2ec9732
Core/SAI: Additions to d0bde02b21
...
Signed-off-by: Nay <dnpd.dd@gmail.com >
2013-08-12 14:06:48 +01:00
Nay
54d2b73f3c
Merge pull request #10513 from Discover-/SmartAI-Casted-CreatureOrGo
...
Core/SmartAI: Drop support for SMART_ACTION_SEND_CASTCREATUREORGO. It is...
2013-08-11 06:26:52 -07:00
Discover-
80bd5b363a
Core/SmartAI: Drop support for SMART_ACTION_SEND_CASTCREATUREORGO. It is unused in the current newest TDB, it never even worked like it should and the exact same purpose of this function is already fulfilled by SMART_ACTION_CALL_CASTEDCREATUREORGO (the correct way).
2013-08-11 02:58:53 +02:00
Discover-
75ca3573c8
Core/SmartAI: Implement SMART_ACTION_SET_POWER, SMART_ACTION_ADD_POWER and SMART_ACTION_REMOVE_POWER (param1 = powertype, param2 = newPower). Required for upcoming EAI to SAI conversion (for ACTION_T_SET_UNIT_FIELD) (only SMART_ACTION_SET_POWER is required for the conversion but might as well do it right when on it).
2013-08-10 14:13:17 +02:00
Nay
eba8c2d345
Merge pull request #10464 from Discover-/SmartAI-Set-Active
...
Core/SmartAI: Allow SMART_ACTION_SET_ACTIVE to take a parameter for on/o...
2013-08-09 08:44:56 -07:00
Nay
edf77a4cf6
Merge pull request #10493 from Discover-/SmartAI-Action-Sound-Update
...
Core/SmartAI: Rename SMART_ACTION_SOUND's parameters and get rid of an e...
2013-08-09 08:38:09 -07:00
Discover-
bd2120593d
Core/SmartAI: Rename SMART_ACTION_SOUND's parameters and get rid of an error that shouldn't be there. The method it calls doesn't take CreatureTextRange (enum) in consideration, but a boolean called onlySelf.
2013-08-09 01:05:56 +02:00
Discover-
9d4c2c5b1e
Core/SmartAI: Implement SMART_TARGET_CLOSEST_ENEMY (25)
...
Required for upcoming EAI to SAI conversion.
Closes #10482
2013-08-07 19:59:06 +01:00
Discover-
d87b0fff2f
Core/SmartAI: Allow SMART_ACTION_SET_ACTIVE to take a parameter for on/off (true/false). Required for upcoming EAI to SAI conversion ( https://github.com/Discover-/EventAI-to-SmartAI )
2013-08-07 02:41:58 +02:00
Kirkhammett
c8bfb9cf4d
DB&Scripts/Icecrown: Fix quest The Last Line Of Defense and script Argent Cannons
...
Closes #998
Closes #10460
2013-08-06 23:16:03 +01:00
Mihapro
e00fc19779
Core/SmartScripts
2013-07-08 18:01:41 +02:00
Shauren
13208ff257
Core/Vehicles: Implemented vehicle seat flag that makes passengers unselectable and dropped redundant UNIT_STATE_ONVEHICLE (it is only checked in the same places as unselectable unit flag)
2013-06-29 15:20:15 +02:00
Shauren
b6aadc6698
Scripts/Misc: Use new movement flag setting methods in scripts
2013-06-18 16:48:46 +02:00
Malcrom
ec474a62e5
Core: More Function Renaming.
2013-06-11 21:25:12 -02:30
Malcrom
66978cfc3b
Core: Some function renaming.
2013-06-11 19:54:27 -02:30
Malcrom
047608e7de
Core/SAI: Add check so npc will not send text to pet. Also updated isPet() to IsPet().
2013-06-11 18:39:51 -02:30
Shauren
fb718d20aa
Core/Scripts: Always run OnSpellClick AI hook, even if there are no spells defined for spellclick event.
2013-06-01 18:30:36 +02:00
Gacko
a78480d56e
Core: Advance logging
...
- Log guid in SmartScript::IsSmart and SmartScript::IsSmartGO
- Prevent false positive for missing game_graveyard_zone data for battlegrounds
2013-06-01 13:58:05 +02:00
Malcrom
b7dd7f0442
Core/SmartAI: Add ability to modify UNIT_FIELD_FLAGS_2 to SAI actions.
2013-05-26 13:22:21 -02:30
Subv
98ad7309c9
* Another small batch of fixes from static analysis tool.
2013-05-17 23:08:28 -05:00
Shauren
7d46703413
Core/Misc: Another batch of fixes for issues found by static analysis
2013-05-17 21:30:02 +02:00
Spp
d1677b2db0
Core/Logging: Performance-related tweaks to logging system
...
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros.
Memleak fix
2013-05-13 15:07:36 +02:00
Gacko
e635ba5b81
Core/SmartAI: SMART_ACTION_FORCE_DESPAWN for dead creatures
2013-03-26 21:51:59 +01:00
Spp
b4ee55dd05
Core/Misc: Do not use singleton when calling to static function ChooseDisplayId (and remove unused parameter)
2013-03-20 14:20:17 +01:00
Gacko
44553d3fd4
Fix some engrish
2013-03-15 16:50:40 +01:00
WyldePointer
47f7687bab
Core: Remove unnecessary commas
...
Last element of enumerator does not need comma after it's value.
Closes #9367
2013-03-09 15:20:57 +00:00
Vincent_Michael
83c98d6dff
Core/SmartAI: Implement SMART_ACTION_SUMMON_CREATURE_GROUP (107)
2013-03-09 02:03:37 +01:00
Nefarion
49fd11ab5a
First step of comment style refactoring to doxygen-style.
2013-03-08 21:55:37 +01:00
Shauren
5b414bb813
Core/Scripts: Removed useless const modifier on method parameters accepting primitive types passed by value
2013-02-19 17:35:27 +01:00
Machiavelli
6b63a98ab0
Core/SmartAI: Prevent recursive EnterEvadeMode call
...
Ref #8679
2013-02-19 16:35:26 +01:00
Nay
028c72a9f2
Core/NPCs: Refactor equipments
...
- creature_template.equipment_id deleted
- creature_equip_template.entry == creature_template.entry
- id field added to creature_equip_template -> PK(entry, id)
- id field in creature_equip_template starts at 1
- creature.equipment_id references id of creature_equip_template
- creature.equipment_id = 0 means no equipment at all (default 1)
- creature.equipment_id = -1 means pick a random equipment from creature_equip_template
- add equipment info to .npc info command
While table creature_equip_template got bigger in size, this system is easier to mantain and allows creatures to have a random template from a group of equipments
2013-02-18 12:24:18 +00:00
Nay
2d861b71ce
Core/SAI: Add actions to set/add/remove (104/105/106) gameobject flags
2013-02-16 18:42:26 +00:00
Shauren
985de41421
Core/SAI: Rewrite SmartAI::RemoveAuras in a safer way
2013-02-09 17:57:27 +01:00
Vincent_Michael
0f53f69e52
Core: Fix build
2013-02-03 01:12:07 +01:00
Vincent_Michael
847cafc121
Scripts/Misc: Some code optimisations
2013-02-03 00:38:34 +01:00
Vincent_Michael
2c2fe7d464
Core/Misc: Small code optimisations
2013-02-02 19:06:47 +01:00
Vincent_Michael
9d7d68395c
Core/SmartAI: Implement SMART_ACTION_SET_ROOT (103)
2013-02-02 18:18:27 +01:00
Naios
6191642e59
Core/SmartScripts: Check Conditions also for timed Events
...
* some cleanup work in SmartScripts.cpp
Core/SmartScripts: Some Corrections to last commit
2013-01-17 20:25:29 +01:00
Spp
be3826825e
Core/Logging: Use correct realmId when logging to DB
2013-01-16 08:59:56 +01:00
Nay
8274e42e3d
Core/SAI: Add 2nd parameter to SMART_ACTION_CALL_FOR_HELP to say "%s calls for help!" if enabled
...
Similar to SMART_ACTION_FLEE_FOR_ASSIST "%s attempts to run away in fear!"
2013-01-10 15:09:12 +00:00
Shauren
59e4f6eb05
Core/SmartScripts: Fixed SAI targets 10 & 14 (SMART_TARGET_CREATURE_GUID, SMART_TARGET_GAMEOBJECT_GUID)
...
Note: If you used these targets to perform actions across maps, it will not work anymore, this functionality is deprecated as it was not safe.
2013-01-03 19:22:12 +01:00