Commit Graph

20231 Commits

Author SHA1 Message Date
Malcrom
18cc075839 DB/Misc: Fixups for Toshley's Station, Blades Edge. 2013-12-18 19:02:22 -03:30
Malcrom
cb3825266a DB/SAI: Some SAI updates to remove dup aura errors and some additions. 2013-12-18 18:20:40 -03:30
Malcrom
676baa890f Scripting/Dragonblight: Commander Eligor Dawnbringer now scripted.
Purely cosmetic but it was a fun thing to script :)
2013-12-18 18:06:30 -03:30
Discover-
e5f7beecf5 Core/SAI: Using SMART_ACTION_FORCE_DESPAWN now despawns the given target_type instead of always the creature itself. 2013-12-18 10:06:19 +01:00
Discover-
a0f7fee922 Core/SAI: Fix compile
Core/SAI: Don't limit SMART_ACTION_SET_INGAME_PHASE_MASK to unit targets only. Thanks to @Shauren for the notice.
2013-12-17 11:38:29 +01:00
Discover-
154ee466eb Core/SAI: Using the action_type SMART_ACTION_SET_REACT_STATE now sets the react state of the target_type. Won't break any scripts as all current cases of this action_type have target_type 1 (SMART_TARGET_SELF). 2013-12-17 11:10:23 +01:00
Discover-
1f4d585bef Core/SAI: In all npc flag related action_types we now check if the target is a creature instead of an unit (creature/player). 2013-12-17 11:06:07 +01:00
Discover-
b5e333255b DB/SAI: Fix two wrong action_types that would make the creature cast the Death Touch spell on no target (SMART_TARGET_NONE) instead of move to given target_x/y/z/o co-ordinates.
The person who wrote this script accidently used action_type 11 (SMART_ACTION_CAST) instead of 69 (SMART_ACTION_MOVE_TO_POS), and since the action_param1 field of SMART_ACTION_MOVE_TO_POS is the motion id (point id given back to SMART_EVENT_MOVEMENTINFORM), it was set to 5. Ironically, the first parameter of SMART_ACTION_CAST is the spell id and it was spell id 5 is Death Touch.
However this script would do nothing because I changed it so that SMART_TARGET_NONE no longer functioned as SMART_TARGET_ACTION_INVOKER in this commit: 9653576cb4. Before this commit, though, it WOULD cast Death Touch. Fun fun fun.
2013-12-17 10:23:31 +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
Discover-
54b7162f1d Core/SAI: Make SMART_ACTION_SET_INGAME_PHASE_MASK set the phasemask of the target_type instead of always the source calling the action type. 2013-12-17 09:44:06 +01:00
Malcrom
1339d38d4c DB/SAI: Fix some duplicate aura errors and clean up the SAI. 2013-12-16 20:23:29 -03:30
Malcrom
b8f9442ec9 Core/Player: Fix logic for questgiver cast spell 2013-12-16 18:50:51 -03:30
jackpoz
b3c810a0fb Core/Misc: Fix warning
Partially revert f0a742a8c4 to fix a warning about unhandled switch case (the same case that Coverity reported as dead code) .
2013-12-16 19:52:50 +01:00
jackpoz
b8908606fc Core/AH: Fix memory leak
Fix memory leak in Auction House when creating an auction with stackable items and a stack of the same amount in the inventory. Leak added in 15a2acfb52 .
2013-12-16 19:38:49 +01:00
Malcrom
f1a82a578b Core/Waypoints: Stop creatures from skipping at waypoint nodes
and add smoothing to pathing.
2013-12-15 20:26:11 -03:30
jackpoz
e90a7f82d4 Core/AI: Fix CreatureAI left uninitialized
Fix CreatureAI left uninitialized for 1 server tick for Creatures with DeathState:DEAD . This is a workaround required after c9cf2f059f changes .

Valgrind log:
 Conditional jump or move depends on uninitialised value(s)
  at : npc_draenei_survivor::npc_draenei_survivorAI::MoveInLineOfSight(Unit*) (zone_azuremyst_isle.cpp:104)
  by : CreatureAI::MoveInLineOfSight_Safe(Unit*) (CreatureAI.cpp:123)
  by : CreatureUnitRelocationWorker(Creature*, Unit*) (GridNotifiers.cpp:134)
  by : Trinity::AIRelocationNotifier::Visit(GridRefManager<Creature>&) (GridNotifiers.cpp:252)
 Uninitialised value was created by a heap allocation
  at : operator new(unsigned long) (vg_replace_malloc.c:319)
  by : npc_draenei_survivor::GetAI(Creature*) const (zone_azuremyst_isle.cpp:66)
  by : ScriptMgr::GetCreatureAI(Creature*) (ScriptMgr.cpp:792)
  by : FactorySelector::selectAI(Creature*) (CreatureAISelector.cpp:41)
  by : Creature::AIM_Initialize(CreatureAI*) (Creature.cpp:716)
  by : Creature::AddToWorld() (Creature.cpp:190)
2013-12-15 21:14:47 +01:00
Malcrom
9dd30ac5ff DB/Creature: Misc template updates 2013-12-15 14:35:15 -03:30
jackpoz
dd4a774c4c Core/Transports: Fix memory leak on shutdown
Fix world transports not being deleted on shutdown.
2013-12-15 18:51:34 +01:00
Malcrom
a2e7191b26 Core/Unit: prevent COMMAND_ATTACK being added for Trained Rock Falcon.
Also added spells for Trained Rock Falcon to db.
2013-12-15 13:43:18 -03:30
jackpoz
f0a742a8c4 Core/Misc: Remove unused code
Remove unused debugging code added in MaNGOS r5067.
Remove dead code from a switch found by Coverity.
2013-12-15 13:37:49 +01:00
w1sht0l1v3
89ee8cbac1 Core/Unit: Add switch to prevent COMMAND_ATTACK being added to action bar for supplied creature entries. 2013-12-15 14:09:49 +02:00
Malcrom
dcfbe53552 Core/Player: Fix questgiver spell cast. 2013-12-14 20:22:39 -03:30
joschiwald
d5f6c2e2a2 Merge branch 'master' of github.com:TrinityCore/TrinityCore 2013-12-14 19:45:01 +01:00
joschiwald
f5c2dca1d5 Scripts: fix crash in spell_jokkum_scriptcast
Closes #11313
2013-12-14 19:43:29 +01:00
Discover-
e17af3f203 Core/Quests: Fix an issue where auto-completed quests would not be automatically completed if the quest was added through either the SmartAI action_type SMART_ACTION_ADD_QUEST, the spell effect SPELL_EFFECT_QUEST_START or the opcode CMSG_QUEST_CONFIRM_ACCEPT. Also fixes auto-complete quests in the SAI and opcode case not calling the AI hook. 2013-12-14 19:42:31 +01:00
Discover-
ec8e94c6ac Core/AI: Fix an issue where the OnQuestAccept hooks were not called for auto-completed quests.
Fixes #11304
2013-12-14 19:39:47 +01:00
jackpoz
ca6b9df261 Core/Misc: Fix some static analysis issues
Fix some static analysis issues about uninitialized values.
2013-12-14 19:36:43 +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
Malcrom
dd546f073a Core/Player: Add another exception to questgiver spell casting. 2013-12-14 14:05:24 -03:30
jackpoz
e28cc4660b Core/Movement: Fix invalid memory access
Fix the stack implementation used in MotionMaster and added few sanity checks to ensure no underflows will be made.

Valgrind log:
 Invalid read of size 8
  at : MotionMaster::top() const (MotionMaster.h:115)
  by : MotionMaster::pop() (MotionMaster.h:91)
  by : MotionMaster::~MotionMaster() (MotionMaster.cpp:74)
  by : Unit::~Unit() (Unit.cpp:296)
  by : Player::~Player() (Player.cpp:880)
  by : WorldSession::HandleCharCreateCallback(Trinity::AutoPtr<PreparedResultSet, ACE_Thread_Mutex>, CharacterCreateInfo*) (CharacterHandler.cpp:665)
  by : WorldSession::HandleCharCreateCallback(Trinity::AutoPtr<PreparedResultSet, ACE_Thread_Mutex>, CharacterCreateInfo*) (CharacterHandler.cpp:516)
2013-12-14 16:51:47 +01:00
Malcrom
9d9d1fb6c6 DB/SAI: Fix an error in Bladespire Mystic SAI 2013-12-14 09:35:36 -03:30
Discover-
4ca63412c8 Core/SmartAI: SMART_ACTION_UPDATE_TEMPLATE will no longer ignore the target type and force the source creature (creature only) to be updated; from now on it updates the given targets to the given entry (actionparam1) 2013-12-13 09:45:58 +01:00
Malcrom
c045d4c7f4 Core/SmartAI: Reset Actions will not be processed until creature reaches home. 2013-12-12 21:23:14 -03:30
Malcrom
9f741432a3 Core/AI: Some code cleanup 2013-12-12 18:09:07 -03:30
Malcrom
9d95351118 Core/SmartAI: Fixed issue where ranged caster would switch to combat ready state between cast. 2013-12-12 16:39:30 -03:30
Aokromes
3cee0b7dc7 Merge pull request #11309 from Lartza/master
DB/SAI: Fix typo
2013-12-12 04:20:31 -08:00
Lartza
d9dac7b9ca Fix typo 2013-12-12 13:46:22 +02:00
Shauren
54fd53f7e3 Core/Movement: Fixed possible invalid memory access 2013-12-12 09:50:52 +01:00
Malcrom
385e2dba37 DB/SAI: Fix one linking error and updated a few to use CMC "Combat Movement Control" 2013-12-11 17:07:59 -03:30
Vincent_Michael
fb26e18523 Core: Fix warnings 2013-12-11 20:30:15 +01:00
Malcrom
e7e708eb0a DB/Misc: fixed comment in one SAI script. 2013-12-11 15:34:57 -03:30
Malcrom
a20c89feee DB/Misc: Some Combat AI, Remove spawns, and aura fixes. 2013-12-11 15:32:59 -03:30
Malcrom
551e51bcb9 DB/Waypoints: Some Outlands waypoints. Mostly Blade's Edge. 2013-12-11 15:10:05 -03:30
joschiwald
a40e814240 Core/SmartScripts: speedup loading/validating sai scripts from db
Before:
>> Loaded 6953 SmartAI scripts in 3543 ms

After:
>> Loaded SmartAIMgr Helpers in 4 ms
>> Loaded 6953 SmartAI scripts in 95 ms
2013-12-11 18:53:05 +01:00
Shauren
488841dd2c Merge pull request #11306 from trickerer/fixaggro
Don't allow units to enter combat upon death
2013-12-11 00:40:46 -08:00
Malcrom
fc7e335d3b Scripting/Obsidian Sanctum: Updated scripts to use Events. 2013-12-11 01:13:23 -03:30
trickerer
91ebea4a77 Don't allow units to enter combat upon death 2013-12-11 09:38:24 +07:00
joschiwald
eddf1b5a64 Scripts: replace some SetOrientation() calls with spline packets and some random changes 2013-12-10 18:46:11 +01:00
joschiwald
bb45db65a0 Merge pull request #11275 from Carbenium/UtgardePinnacle
Scripts/UtgardePinnacle: Convert Svala Sorrowgrave to event system
2013-12-10 07:29:00 -08:00
Carbenium
000bfbb732 Convert Svala Sorrowgrave to event system 2013-12-10 16:05:02 +01:00