Trinitycore: Core/Spell: Quest items created by spellclick

Created on 3 Apr 2018  路  23Comments  路  Source: TrinityCore/TrinityCore

Description:

The quest spell Rifle the Bodies: Create Mage Hunter Personal Effects does not create any loot item.

The quest Rifle the Bodies can not be completed, because Mage Hunter Personal Effects never drops and therefore Moonrest Gardens Plans can not be looted.

Related links:

I noticed in creature_template that creature entry 26477 does not have any loot table, but I presume that is because a corpse can't have conditional loot based on whether the quest is active or not.

See also https://woehead.way-of-elendil.fr/?spell=47096 for condition details.

@Killyana : I noticed that https://woehead.way-of-elendil.fr/?item=35792 says "This item is not available to players." -- in contrast to the wowhead item page. Does that mean it has reacted to the item never dropping on current TC 3.3.5 source, seeing that woehead.way-of-elendil.fr seems to be pretty up to date with TC 3.3.5 content?

Current behaviour:

Quest ID 11999 - Rifle the Bodies - (and most likely ID 12000, the Alliance version) can not be completed because the quest item Moonrest Gardens Plans will never drop as part of the content in Mage Hunter Personal Effects

Expected behaviour:

Mage Hunter Personal Effects (http://www.wowhead.com/item=35792/mage-hunter-personal-effects) should have a 100% drop rate because it should be created on spellclick (cast http://www.wowhead.com/spell=47096/rifle-the-bodies-create-mage-hunter-personal-effects ) for each of the Dead Mage Hunter (http://www.wowhead.com/npc=26477/dead-mage-hunter) corpses you right-click to get loot and therefore a chance to find the Moonrest Gardens Plans.

Steps to reproduce the problem:

  1. get a level 62+ character (70-75 is recommended, this is in Dragonblight, Northrend)
  2. .quest add 11999 (or quest add 12000 if you are Alliance)
  3. .go creature id 26477 (be prepared to fight nearby level 72-73 hostile mobs).
  4. Loot the corpse
  5. Notice that the corpse despawns without loot or anything else (except for some useless visual rotation)

Branch(es): 3.3.5

(I have only tested using the 3.3.5 branch, not master. Spell system changes are have been more abundant on 3.3.5 lately, so this could perhaps not be an issue on master.)

TC rev. hash/commit:

TC>server debug
TrinityCore rev. 309738dc3e08 2018-04-03 08:28:41 -0300 (3.3.5 branch) (Win64, Release, Static)
Using SSL version: OpenSSL 1.1.0h 27 Mar 2018 (library: OpenSSL 1.1.0h 27 Mar 2018)
Using Boost version: 1.65.1
Using MySQL version: 5.6.38
Using CMake version: 3.10.1
Compiled on: Windows 10.0.16299
Automatic database updates are enabled for the following databases: Auth, Characters, World
Worldserver listening connections on port 8085
Realmlist (Realm Id: 1) configured in port 8085
VMAPs status: Enabled. LineOfSight: 1, getHeight: 1, indoorCheck: 1
MMAPs status: Enabled
maps directory located in ./maps. Total size: 252191207 bytes
vmaps directory located in ./vmaps. Total size: 588247501 bytes
mmaps directory located in ./mmaps. Total size: 2152621724 bytes
Using enUS DBC Locale as default. All available DBC locales: enUS
Using World DB: TDB 335.64
TC>_

Operating system: Windows 10.0.16299

Comp-Core Feedback-FixOutdatedMissingWIP Priority-High Sub-Quests Sub-ScriptingEngine Sub-Spells

Most helpful comment

Checked sniffs, https://www.wowhead.com/spell=61286/world-generic-dismount-cancel-shapeshift isn't used by any of the relevant spellclick targets but by https://www.wowhead.com/npc=32548/corastrasza.

final version for clarity

-- 26477 Dead Mage Hunter
-- 61832 Rifle the Bodies: Create Magehunter Personal Effects Cover
-- 47096 Rifle the Bodies: Create Mage Hunter Personal Effects

-- 28202 Zul'Drak Rat
-- 50926 Gluttonous Lurkers: Create Zul'Drak Rat Cover
-- 50927 Create Zul'Drak Rat

-- 28203 Gorged Lurking Basilisk
-- 50918 Gluttonous Lurkers: Create Basilisk Crystals Cover
-- 50919 Create Basilisk Crystals

-- 29856 Gooey Ghoul Drool
-- 55364 Create Ghoul Drool Cover
-- 55363 Create Gooey Ghoul Drool

DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (26477, 28202, 28203, 29856);
INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
(26477, 61832, 1, 0),
(28202, 50926, 1, 0),
(28203, 50918, 1, 0),
(29856, 55364, 1, 0);

DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26477, 28202, 28203, 29856) AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(26477,0,0,0, 8,0,100,0,61832,0,0,0,11,47096,3,0,0,0,0,7,0,0,0,0,0,0,0,"Dead Mage Hunter - On Spellhit 'Rifle the Bodies: Create Magehunter Personal Effects Cover' - Cast `Rifle the Bodies: Create Mage Hunter Personal Effects`"),
(26477,0,1,0,31,0,100,0,47096,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dead Mage Hunter - On Spellhit target 'Rifle the Bodies: Create Magehunter Personal Effects' - Despawn Instant"),
(28202,0,0,0, 8,0,100,0,50926,0,0,0,11,50927,3,0,0,0,0,7,0,0,0,0,0,0,0,"Zul'Drak Rat - On Spellhit 'Gluttonous Lurkers: Create Zul'Drak Rat Cover' - Cast `Create Zul'Drak Rat`"),
(28202,0,1,0,31,0,100,0,50927,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Zul'Drak Rat - On Spellhit target 'Create Zul'Drak Rat' - Despawn Instant"),
(28203,0,0,0, 8,0,100,0,50918,0,0,0,11,50919,3,0,0,0,0,7,0,0,0,0,0,0,0,"Gorged Lurking Basilisk - On Spellhit 'Gluttonous Lurkers: Create Basilisk Crystals Cover' - Cast `Create Basilisk Crystals`)"),
(28203,0,1,0,31,0,100,0,50919,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gorged Lurking Basilisk - On Spellhit target 'Create Basilisk Crystals' - Despawn Instant"),
(29856,0,0,0, 8,0,100,0,55364,0,0,0,11,55363,3,0,0,0,0,7,0,0,0,0,0,0,0,"Gooey Ghoul Drool - On Spellhit 'Create Ghoul Drool Cover' - Cast `Create Gooey Ghoul Drool`"),
(29856,0,1,0,31,0,100,0,55363,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gooey Ghoul Drool - On Spellhit target 'Create Gooey Ghoul Drool' - Despawn Instant");

DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 18 AND `SourceGroup` IN (26477, 28202, 28203, 29856);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(18, 26477, 61832, 0, 0, 9, 0, 11999, 0, 0, 0, 0, 0, "", "spellclick 'Rifle the Bodies: Create Magehunter Personal Effects Cover' requires quest 'Rifle the Bodies (H)' active"),
(18, 26477, 61832, 0, 1, 9, 0, 12000, 0, 0, 0, 0, 0, "", "spellclick 'Rifle the Bodies: Create Magehunter Personal Effects Cover' requires quest 'Rifle the Bodies (A)' active"),
(18, 28202, 50926, 0, 0, 9, 0, 12527, 0, 0, 0, 0, 0, "", "spellclick 'Gluttonous Lurkers: Create Zul'Drak Rat Cover' requires quest 'Gluttonous Lurkers' active"),
(18, 28203, 50918, 0, 0, 9, 0, 12527, 0, 0, 0, 0, 0, "", "spellclick 'Gluttonous Lurkers: Create Basilisk Crystals Cover' requires quest 'Gluttonous Lurkers' active"),
(18, 29856, 55364, 0, 0, 9, 0, 12629, 0, 0, 0, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires quest 'You Can Run, But You Can't Hide' active"),
(18, 29856, 55364, 0, 0, 2, 0, 38687, 5, 0, 1, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires not 5 Gooey Ghoul Drool in bags"),
(18, 29856, 55364, 0, 1, 9, 0, 12643, 0, 0, 0, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires quest 'Silver Lining' active"),
(18, 29856, 55364, 0, 1, 2, 0, 38687, 5, 0, 1, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires not 5 Gooey Ghoul Drool in bags");

All 23 comments

~.go creature ID 26477 - Creature not found!~ uppercase xD -> .go creature id 26477

Thank you. Any helpful / constructive comments are welcome, be it regarding my issue post content or possible ways to narrow down what causes this issue.

Feel free to tell me if I should cut down on the issue post (and if so, which parts of the text are redundant or superfluous).

This is weird it's just a npc_spellclick_spells
``` sql
SELECT * FROM npc_spellclick_spells WHERE spell_id in (61832, 47096);

npc_entry  spell_id  cast_flags  user_type  
---------  --------  ----------  ---------
    26477     61832           1          0

Good point, I didn't think of checking npc_spellclick_spells, maybe because

SELECT * FROM `smart_scripts` WHERE `entryorguid`=26477;
entryorguid  source_type      id    link  event_type  event_phase_mask  event_chance  event_flags  event_param1  event_param2  event_param3  event_param4  event_param5  action_type  action_param1  action_param2  action_param3  action_param4  action_param5  action_param6  target_type  target_param1  target_param2  target_param3  target_x  target_y  target_z  target_o  comment
-----------  -----------  ------  ------  ----------  ----------------  ------------  -----------  ------------  ------------  ------------  ------------  ------------  -----------  -------------  -------------  -------------  -------------  -------------  -------------  -----------  -------------  -------------  -------------  --------  --------  --------  --------  -------------------------------------------------------------------------------------------------------------------------
      26477            0       0       0           8                 0           100          513         61832             0             0             0             0           41              0              0              0              0              0              0            1              0              0              0         0         0         0         0  Dead Mage Hunter - On Spellhit 'Rifle the Bodies: Create Magehunter Personal Effects Cover' - Despawn Instant (No Repeat)
-----------  -----------  ------  ------  ----------  ----------------  ------------  -----------  ------------  ------------  ------------  ------------  ------------  -----------  -------------  -------------  -------------  -------------  -------------  -------------  -----------  -------------  -------------  -------------  --------  --------  --------  --------  -------------------------------------------------------------------------------------------------------------------------

which made me think this could possibly have got something to do with SAI issues. Then again, it could also either be a spell script issue or a loot table issue, but that is just what I was thinking while trying to get an idea of what could cause this at all.

The despawn action by SAI is executed before the cast ends, so it fails.

Maybe the despawn action should be executed after the spell action has finished, so perhaps split that SAI action into 2 separate actions, if that is possible?

Try:

-- Dead Mage Hunter SAI
DELETE FROM `smart_scripts` WHERE `entryorguid`=26477 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(26477,0,0,1,8,0,100,513,61832,0,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dead Mage Hunter - On Spellhit 'Rifle the Bodies: Create Magehunter Personal Effects Cover' - Despawn In 1000 ms (No Repeat)"),
(26477,0,1,0,61,0,100,0,0,0,0,0,83,16777216,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dead Mage Hunter - On Spellhit - Remove Npc Flag Spellclick (No Repeat)");

Edit:
I removed the spellclick to avoid double click

Yes but for me the problem here the npc changes the orientation to the player before casting the spell, and this mustn't happen.

I tested in a old core, this issue doesn't happen, it looks like spells from npc_spellclick_spells were triggered with no cast time and no facing but it's no longer the case.

@ariel- any idea about this issue?

hmm, similar to mageguards in Dalaran...

  1. Enter with alliance character
  2. .go xyz 5849.16 602.093 651 571
  3. Try entering the base several times
  4. The guard turns around and bug. Everyone who passes through the back will be teleported

Oh. I see. You need to trespass at least 5-6 times before that NPC bugs out, rotates 120掳 and treats those "behind" him as trespassers, even though they are in the neutral zone (passing by in the street). I don't know if that is related, unless it is a core spell issue.

there's an issue that: Core/Spell: Focus is not cleared if the cast is interrupted

Thanks. I forgot that issue #18373 is still open.

variation on @Gooyeth solution

DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=26477 AND `spell_id` = 47096;

-- Dead Mage Hunter SAI
DELETE FROM `smart_scripts` WHERE `entryorguid`=26477 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(26477,0,0,0, 8,0,100,513,61832,0,0,0,11,47096,3,0,0,0,0,7,0,0,0,0,0,0,0,"Dead Mage Hunter - On Spellhit 'Rifle the Bodies: Create Magehunter Personal Effects Cover' - Cast `Rifle the Bodies: Create Mage Hunter Personal Effects` (No Repeat)"),
(26477,0,1,0,31,0,100,513,47096,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dead Mage Hunter - On Spellhit target 'Rifle the Bodies: Create Magehunter Personal Effects' - Despawn Instant (No Repeat)");

Despawn happens now after item create finishes.
Can this or @Gooyeth version be applied to
https://www.wowhead.com/quest=11960/planning-for-the-future
https://www.wowhead.com/quest=12000/rifle-the-bodies
https://www.wowhead.com/quest=12527/gluttonous-lurkers
https://www.wowhead.com/quest=12629/you-can-run-but-you-cant-hide
and then the orientation issue gets its own ticket?

I tested Gluttonous Lurkers I noticed you can loot the rats while mounted, and the item is created without the rat despawning.
This makes sense since npc_spellclick_spells triggers the player to cast the spell that triggers SAI to despawn, this spell fails because mounted.
Meanwhile npc_spellclick_spells triggers the rat to cast item create on the player.
Rifle the Bodies and Planning for the Future solves this by having the npc also cast https://www.wowhead.com/spell=61286/world-generic-dismount-cancel-shapeshift.

Can someone double check sniffs for this spell from
https://www.wowhead.com/npc=26200/snowfall-glade-pup
https://www.wowhead.com/npc=26477/dead-mage-hunter
https://www.wowhead.com/npc=28202/zuldrak-rat
https://www.wowhead.com/npc=28203/gorged-lurking-basilisk
https://www.wowhead.com/npc=29856/gooey-ghoul-drool

Looks like a useful solution to separate the spellclick loot creation and the despawn action from each other. 馃憤


edit: - does the despawn action always happen before the loot creation when they are in the same SAI line?

https://www.wowhead.com/spell=61286/world-generic-dismount-cancel-shapeshift is the spell that causes Dead Mage Hunter, Zul'Drak Rat and Gorged Lurking Basilisk to orient themselves. Gooey Ghoul Drool doesn't seem to do the same.

Here's the status quo which doesn't give loot, unless you're mounted:

SELECT * FROM `npc_spellclick_spells` WHERE `npc_entry` IN (26477, 28202, 28203, 29856);
26477, 47096, 2, 0
26477, 61286, 2, 0
26477, 61832, 1, 0
28202, 50926, 1, 0
28202, 50927, 2, 0
28203, 50918, 1, 0
28203, 50919, 2, 0
29856, 55363, 2, 0
29856, 55364, 1, 0

SELECT * FROM `smart_scripts` WHERE `entryorguid` IN (26477, 28202, 28203, 29856) AND `source_type`=0;
26477, 0, 0, 0, 8, 0, 100, 513, 61832, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, Dead Mage Hunter - On Spellhit 'Rifle the Bodies: Create Magehunter Personal Effects Cover' - Despawn Instant (No Repeat)
28202, 0, 0, 0, 8, 0, 100, 512, 50926, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, Zul'Drak Rat - On Spellhit 'Gluttonous Lurkers: Create Zul'Drak Rat Cover' - Despawn Instant (Phase 1) (No Repeat) (Dungeon)
28203, 0, 0, 0, 8, 0, 100, 512, 50918, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, Gorged Lurking Basilisk - On Spellhit 'Gluttonous Lurkers: Create Basilisk Crystals Cover' - Despawn Instant (Phase 1) (No Repeat) (Dungeon)
29856, 0, 0, 0, 8, 0, 100, 512, 55364, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, Gooey Ghoul Drool - On Spellhit 'Create Ghoul Drool Cover' - Despawn Instant

Here's my suggestion more fleshed out:

-- 61286 World Generic Dismount/Cancel Shapeshift

-- 26477 Dead Mage Hunter
-- 61832 Rifle the Bodies: Create Magehunter Personal Effects Cover
-- 47096 Rifle the Bodies: Create Mage Hunter Personal Effects

-- 28202 Zul'Drak Rat
-- 50926 Gluttonous Lurkers: Create Zul'Drak Rat Cover
-- 50927 Create Zul'Drak Rat

-- 28203 Gorged Lurking Basilisk
-- 50918 Gluttonous Lurkers: Create Basilisk Crystals Cover
-- 50919 Create Basilisk Crystals

-- 29856 Gooey Ghoul Drool
-- 55364 Create Ghoul Drool Cover
-- 55363 Create Gooey Ghoul Drool

DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (26477, 28202, 28203, 29856);
INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
(26477, 61832, 1, 0),
(26477, 61286, 2, 0),
(28202, 50926, 1, 0),
(28202, 61286, 2, 0),
(28203, 50918, 1, 0),
(28203, 61286, 2, 0),
(29856, 55364, 1, 0),
(29856, 61286, 2, 0);

DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26477, 28202, 28203, 29856) AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(26477,0,0,0, 8,0,100,513,61832,0,0,0,11,47096,3,0,0,0,0,7,0,0,0,0,0,0,0,"Dead Mage Hunter - On Spellhit 'Rifle the Bodies: Create Magehunter Personal Effects Cover' - Cast `Rifle the Bodies: Create Mage Hunter Personal Effects` (No Repeat)"),
(26477,0,1,0,31,0,100,513,47096,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dead Mage Hunter - On Spellhit target 'Rifle the Bodies: Create Magehunter Personal Effects' - Despawn Instant (No Repeat)"),
(28202,0,0,0, 8,0,100,513,50926,0,0,0,11,50927,3,0,0,0,0,7,0,0,0,0,0,0,0,"Zul'Drak Rat - On Spellhit 'Gluttonous Lurkers: Create Zul'Drak Rat Cover' - Cast `Create Zul'Drak Rat` (No Repeat)"),
(28202,0,1,0,31,0,100,513,50927,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Zul'Drak Rat - On Spellhit target 'Create Zul'Drak Rat' - Despawn Instant (No Repeat)"),
(28203,0,0,0, 8,0,100,513,50918,0,0,0,11,50919,3,0,0,0,0,7,0,0,0,0,0,0,0,"Gorged Lurking Basilisk - On Spellhit 'Gluttonous Lurkers: Create Basilisk Crystals Cover' - Cast `Create Basilisk Crystals` (No Repeat)"),
(28203,0,1,0,31,0,100,513,50919,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gorged Lurking Basilisk - On Spellhit target 'Create Basilisk Crystals' - Despawn Instant (No Repeat)"),
(29856,0,0,0, 8,0,100,513,55364,0,0,0,11,55363,3,0,0,0,0,7,0,0,0,0,0,0,0,"Gooey Ghoul Drool - On Spellhit 'Create Ghoul Drool Cover' - Cast `Create Gooey Ghoul Drool` (No Repeat)"),
(29856,0,1,0,31,0,100,513,55363,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gooey Ghoul Drool - On Spellhit target 'Create Gooey Ghoul Drool' - Despawn Instant (No Repeat)");

All 4 npcs will spawn their items and dismount the player, however
Dead Mage Hunter, Zul'Drak Rat and Gorged Lurking Basilisk orients themselves to the player. Gooey Ghoul Drool doesn't, as mentioned above.

If you remove the dismount spell

DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (26477, 28202, 28203, 29856);
INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
(26477, 61832, 1, 0),
(28202, 50926, 1, 0),
(28203, 50918, 1, 0),
(29856, 55364, 1, 0);

Dead Mage Hunter creates item, doesn't rotate and still dismounts you: because second effect of https://www.wowhead.com/spell=61832/, the other cover spells do not have this.
Gooey Ghoul Drool stays the same except not dismounting you when you click it.
Zul'Drak Rat and Gorged Lurking Basilisks can't be looted, you attack them instead now.
I have no idea why that change happened.

I see. The suggestions so far have mostly been DB/SAI content, but it looks like Killyana is saying that this problem needs to be fixed in /src/server/game/Spells/ (a.k.a. Core/Spells).

Noob fault, inconsistency issue was with conditions, forgot to check there first.

DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 18 AND `SourceGroup` IN (26477, 28202, 28203, 29856);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(18, 26477, 61832, 0, 0, 9, 0, 11999, 0, 0, 0, 0, 0, "", "spellclick 'Rifle the Bodies: Create Magehunter Personal Effects Cover' requires quest 'Rifle the Bodies (H)' active"),
(18, 26477, 61832, 0, 1, 9, 0, 12000, 0, 0, 0, 0, 0, "", "spellclick 'Rifle the Bodies: Create Magehunter Personal Effects Cover' requires quest 'Rifle the Bodies (A)' active"),
(18, 28202, 50926, 0, 0, 9, 0, 12527, 0, 0, 0, 0, 0, "", "spellclick 'Gluttonous Lurkers: Create Zul'Drak Rat Cover' requires quest 'Gluttonous Lurkers' active"),
(18, 28203, 50918, 0, 0, 9, 0, 12527, 0, 0, 0, 0, 0, "", "spellclick 'Gluttonous Lurkers: Create Basilisk Crystals Cover' requires quest 'Gluttonous Lurkers' active"),
(18, 29856, 55364, 0, 0, 9, 0, 12629, 0, 0, 0, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires quest 'You Can Run, But You Can't Hide' active"),
(18, 29856, 55364, 0, 0, 2, 0, 38687, 5, 0, 1, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires not 5 Gooey Ghoul Drool in bags"),
(18, 29856, 55364, 0, 1, 9, 0, 12643, 0, 0, 0, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires quest 'Silver Lining' active"),
(18, 29856, 55364, 0, 1, 2, 0, 38687, 5, 0, 1, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires not 5 Gooey Ghoul Drool in bags");

This assumes the npc_spellclick_spells version without "World Generic Dismount/Cancel Shapeshift" is used, I'll add those if someone can confirm with sniffs.

Possible new bug
Completing the quests "You Can Run, But You Can't Hide" or "Silver Lining" disables loot clicking the slimes, however gaining 5 drools does not; you can still click the slimes with 5 in the bag but the spell won't activate.

Checked sniffs, https://www.wowhead.com/spell=61286/world-generic-dismount-cancel-shapeshift isn't used by any of the relevant spellclick targets but by https://www.wowhead.com/npc=32548/corastrasza.

final version for clarity

-- 26477 Dead Mage Hunter
-- 61832 Rifle the Bodies: Create Magehunter Personal Effects Cover
-- 47096 Rifle the Bodies: Create Mage Hunter Personal Effects

-- 28202 Zul'Drak Rat
-- 50926 Gluttonous Lurkers: Create Zul'Drak Rat Cover
-- 50927 Create Zul'Drak Rat

-- 28203 Gorged Lurking Basilisk
-- 50918 Gluttonous Lurkers: Create Basilisk Crystals Cover
-- 50919 Create Basilisk Crystals

-- 29856 Gooey Ghoul Drool
-- 55364 Create Ghoul Drool Cover
-- 55363 Create Gooey Ghoul Drool

DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (26477, 28202, 28203, 29856);
INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
(26477, 61832, 1, 0),
(28202, 50926, 1, 0),
(28203, 50918, 1, 0),
(29856, 55364, 1, 0);

DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26477, 28202, 28203, 29856) AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(26477,0,0,0, 8,0,100,0,61832,0,0,0,11,47096,3,0,0,0,0,7,0,0,0,0,0,0,0,"Dead Mage Hunter - On Spellhit 'Rifle the Bodies: Create Magehunter Personal Effects Cover' - Cast `Rifle the Bodies: Create Mage Hunter Personal Effects`"),
(26477,0,1,0,31,0,100,0,47096,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Dead Mage Hunter - On Spellhit target 'Rifle the Bodies: Create Magehunter Personal Effects' - Despawn Instant"),
(28202,0,0,0, 8,0,100,0,50926,0,0,0,11,50927,3,0,0,0,0,7,0,0,0,0,0,0,0,"Zul'Drak Rat - On Spellhit 'Gluttonous Lurkers: Create Zul'Drak Rat Cover' - Cast `Create Zul'Drak Rat`"),
(28202,0,1,0,31,0,100,0,50927,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Zul'Drak Rat - On Spellhit target 'Create Zul'Drak Rat' - Despawn Instant"),
(28203,0,0,0, 8,0,100,0,50918,0,0,0,11,50919,3,0,0,0,0,7,0,0,0,0,0,0,0,"Gorged Lurking Basilisk - On Spellhit 'Gluttonous Lurkers: Create Basilisk Crystals Cover' - Cast `Create Basilisk Crystals`)"),
(28203,0,1,0,31,0,100,0,50919,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gorged Lurking Basilisk - On Spellhit target 'Create Basilisk Crystals' - Despawn Instant"),
(29856,0,0,0, 8,0,100,0,55364,0,0,0,11,55363,3,0,0,0,0,7,0,0,0,0,0,0,0,"Gooey Ghoul Drool - On Spellhit 'Create Ghoul Drool Cover' - Cast `Create Gooey Ghoul Drool`"),
(29856,0,1,0,31,0,100,0,55363,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gooey Ghoul Drool - On Spellhit target 'Create Gooey Ghoul Drool' - Despawn Instant");

DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 18 AND `SourceGroup` IN (26477, 28202, 28203, 29856);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(18, 26477, 61832, 0, 0, 9, 0, 11999, 0, 0, 0, 0, 0, "", "spellclick 'Rifle the Bodies: Create Magehunter Personal Effects Cover' requires quest 'Rifle the Bodies (H)' active"),
(18, 26477, 61832, 0, 1, 9, 0, 12000, 0, 0, 0, 0, 0, "", "spellclick 'Rifle the Bodies: Create Magehunter Personal Effects Cover' requires quest 'Rifle the Bodies (A)' active"),
(18, 28202, 50926, 0, 0, 9, 0, 12527, 0, 0, 0, 0, 0, "", "spellclick 'Gluttonous Lurkers: Create Zul'Drak Rat Cover' requires quest 'Gluttonous Lurkers' active"),
(18, 28203, 50918, 0, 0, 9, 0, 12527, 0, 0, 0, 0, 0, "", "spellclick 'Gluttonous Lurkers: Create Basilisk Crystals Cover' requires quest 'Gluttonous Lurkers' active"),
(18, 29856, 55364, 0, 0, 9, 0, 12629, 0, 0, 0, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires quest 'You Can Run, But You Can't Hide' active"),
(18, 29856, 55364, 0, 0, 2, 0, 38687, 5, 0, 1, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires not 5 Gooey Ghoul Drool in bags"),
(18, 29856, 55364, 0, 1, 9, 0, 12643, 0, 0, 0, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires quest 'Silver Lining' active"),
(18, 29856, 55364, 0, 1, 2, 0, 38687, 5, 0, 1, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires not 5 Gooey Ghoul Drool in bags");

@Wyrserth here the sniffs:
61832 is cast by the player on the npc and it works fine as the dismount effect hit the player and the effect used to despawn the npc hit the npc.

47096 is cast by the npc on the player, and it doesn't work as the npc despawns apparently before the cast ends, and it also changes orientation.

ServerToClient: SMSG_SPELL_START (0x6415) Length: 41 ConnIdx: 2 Time: 06/10/2012 16:33:50.610 Number: 97966
Caster GUID: Full: 0x60000000xxxxxxx Type: Player Low: xxxxxxxxxxx Name: xxxxxxxxxxx
Caster Unit GUID: Full: 0x60000000xxxxxxx Type: Player Low: xxxxxxxxxxx Name: xxxxxxxxxxx
Cast Count: 0
Spell ID: 61832 (61832)
Cast Flags: 17039370 (HasTrajectory, Unknown3, Unknown16, Unknown21)
Time: 0
Time2: 0
Target Flags: 2 (Unit)
Target GUID: Full: 0xF130676D005DBA61 Type: Creature Entry: 26477 Low: 6142561

ServerToClient: SMSG_SPELL_GO (0x6E16) Length: 59 ConnIdx: 2 Time: 06/10/2012 16:33:50.610 Number: 97967
Caster GUID: Full: 0x60000000xxxxxxx Type: Player Low: xxxxxxxxxxx Name: xxxxxxxxxxx
Caster Unit GUID: Full: 0x60000000xxxxxxx Type: Player Low: xxxxxxxxxxx Name: xxxxxxxxxxx
Cast Count: 0
Spell ID: 61832 (61832)
Cast Flags: 17039624 (Unknown3, Unknown7, Unknown16, Unknown21)
Time: 0
Time2: 3604009771
Hit Count: 2
[0] Hit GUID: Full: 0xF130676D005DBA61 Type: Creature Entry: 26477 Low: 6142561
[1] Hit GUID: Full: 0x60000000xxxxxxx Type: Player Low: xxxxxxxxxxx Name: xxxxxxxxxxx
Miss Count: 0
Target Flags: 2 (Unit)
Target GUID: Full: 0xF130676D005DBA61 Type: Creature Entry: 26477 Low: 6142561

ServerToClient: SMSG_SPELL_START (0x6415) Length: 43 ConnIdx: 2 Time: 06/10/2012 16:33:50.782 Number: 97982
Caster GUID: Full: 0xF130676D005DBA61 Type: Creature Entry: 26477 Low: 6142561
Caster Unit GUID: Full: 0xF130676D005DBA61 Type: Creature Entry: 26477 Low: 6142561
Cast Count: 0
Spell ID: 47096 (47096)
Cast Flags: 10 (HasTrajectory, Unknown3)
Time: 0
Time2: 500
Target Flags: 2 (Unit)
Target GUID: Full: 0x60000000xxxxxxx Type: Player Low: xxxxxxxxxxx Name: xxxxxxxxxxx

ServerToClient: SMSG_SPELL_GO (0x6E16) Length: 53 ConnIdx: 2 Time: 06/10/2012 16:33:51.328 Number: 98016
Caster GUID: Full: 0xF130676D005DBA61 Type: Creature Entry: 26477 Low: 6142561
Caster Unit GUID: Full: 0xF130676D005DBA61 Type: Creature Entry: 26477 Low: 6142561
Cast Count: 0
Spell ID: 47096 (47096)
Cast Flags: 264 (Unknown3, Unknown7)
Time: 0
Time2: 3604009951
Hit Count: 1
[0] Hit GUID: Full: 0x60000000xxxxxxx Type: Player Low: xxxxxxxxxxx Name: xxxxxxxxxxx
Miss Count: 0
Target Flags: 2 (Unit)
Target GUID: Full: 0x60000000xxxxxxx Type: Player Low: xxxxxxxxxxx Name: xxxxxxxxxxx

ServerToClient: SMSG_DESTROY_OBJECT (0x4724) Length: 9 ConnIdx: 2 Time: 06/10/2012 16:33:51.328 Number: 98017
GUID: Full: 0xF130676D005DBA61 Type: Creature Entry: 26477 Low: 6142561
Despawn Animation: false

Blizzlike script:

UPDATE `creature_template` SET `AIName`='', `unit_flags`=0 WHERE `entry` IN (26477);
DELETE FROM `smart_scripts` WHERE `entryorguid`=26477 AND `source_type`=0;
UPDATE `creature_template_addon` SET `auras`="29266"  WHERE `entry` IN (26477);
DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=26477;
INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
(26477, 61832, 1, 0),
(26477, 47096, 2, 0);
DELETE FROM `spell_scripts` WHERE `id`=61832;
INSERT INTO `spell_scripts` (`id`,`effIndex`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
(61832,0,0,18,0,0,0,0,0,0,0);

You can change delay=1 and in this case the player will receive the item, also the npc will change orientation

There 2 separates issues:

  • Before some changes related to dynamic spawns, when a unit despawn it will turn invisible to the player then it will be deleted from the map 4/5 secs after that, I checked this behaviors in master, cata and old revision without dynamic spawn, and the spell is casted.
  • The npc must change orientation when it cast the spell, I on't know if this mut be applied to all spell click or it's jut because the npc is supposed to be "dead" (feign death aura)

``sql -- 26477 Dead Mage Hunter -- 61832 Rifle the Bodies: Create Magehunter Personal Effects Cover -- 47096 Rifle the Bodies: Create Mage Hunter Personal Effects UPDATEcreature_templateSETAIName='',unit_flags=0 WHEREentryIN (26477); DELETE FROMsmart_scriptsWHEREentryorguid=26477 ANDsource_type=0; UPDATEcreature_template_addonSETauras="29266" WHEREentryIN (26477); DELETE FROMnpc_spellclick_spellsWHEREnpc_entry=26477; INSERT INTOnpc_spellclick_spells(npc_entry,spell_id,cast_flags,user_type) VALUES (26477, 61832, 1, 0), (26477, 47096, 2, 0); DELETE FROMspell_scriptsWHEREid=61832; INSERT INTOspell_scripts(id,effIndex,delay,command,datalong,datalong2,dataint,x,y,z,o`) VALUES
(61832,0,1,18,0,0,0,0,0,0,0);

-- 28202 Zul'Drak Rat
-- 50926 Gluttonous Lurkers: Create Zul'Drak Rat Cover
-- 50927 Create Zul'Drak Rat
UPDATE creature_template SET AIName='' WHERE entry IN (28202);
DELETE FROM smart_scripts WHERE entryorguid=28202 AND source_type=0;
DELETE FROM npc_spellclick_spells WHERE npc_entry=28202;
INSERT INTO npc_spellclick_spells (npc_entry, spell_id, cast_flags, user_type) VALUES
(28202, 50926, 1, 0),
(28202, 50927, 2, 0);
DELETE FROM spell_scripts WHERE id=50926;
INSERT INTO spell_scripts (id,effIndex,delay,command,datalong,datalong2,dataint,x,y,z,o) VALUES
(50926,0,1,18,0,0,0,0,0,0,0);

-- 28203 Gorged Lurking Basilisk
-- 50918 Gluttonous Lurkers: Create Basilisk Crystals Cover
-- 50919 Create Basilisk Crystals
UPDATE creature_template SET AIName='' WHERE entry IN (28203);
DELETE FROM smart_scripts WHERE entryorguid=28203 AND source_type=0;
DELETE FROM npc_spellclick_spells WHERE npc_entry=28203;
INSERT INTO npc_spellclick_spells (npc_entry, spell_id, cast_flags, user_type) VALUES
(28203, 50918, 1, 0),
(28203, 50919, 2, 0);
DELETE FROM spell_scripts WHERE id=50918;
INSERT INTO spell_scripts (id,effIndex,delay,command,datalong,datalong2,dataint,x,y,z,o) VALUES
(50918,0,1,18,0,0,0,0,0,0,0);

DELETE FROM creature_template_addon WHERE entry = 28203;
INSERT INTO creature_template_addon (entry, path_id, mount, bytes1, bytes2, emote, auras) VALUES
(28203, 0, 0, 0, 4097, 0, '50917');

-- 29856 Gooey Ghoul Drool
-- 55364 Create Ghoul Drool Cover
-- 55363 Create Gooey Ghoul Drool

UPDATE creature_template SET AIName='' WHERE entry IN (29856);
DELETE FROM smart_scripts WHERE entryorguid=29856 AND source_type=0;
DELETE FROM npc_spellclick_spells WHERE npc_entry=29856;
INSERT INTO npc_spellclick_spells (npc_entry, spell_id, cast_flags, user_type) VALUES
(29856, 55364, 1, 0),
(29856, 55363, 2, 0);
DELETE FROM spell_scripts WHERE id=55364;
INSERT INTO spell_scripts (id,effIndex,delay,command,datalong,datalong2,dataint,x,y,z,o) VALUES
(55364,0,2,18,0,0,0,0,0,0,0);

DELETE FROM conditions WHERE SourceTypeOrReferenceId = 18 AND SourceGroup IN (29856);
INSERT INTO conditions (SourceTypeOrReferenceId, SourceGroup, SourceEntry, SourceId, ElseGroup, ConditionTypeOrReference, ConditionTarget, ConditionValue1, ConditionValue2, ConditionValue3, NegativeCondition, ErrorType, ErrorTextId, ScriptName, Comment) VALUES
(18, 29856, 55364, 0, 0, 9, 0, 12629, 0, 0, 0, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires quest 'You Can Run, But You Can't Hide' active"),
(18, 29856, 55364, 0, 0, 2, 0, 38687, 5, 0, 1, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires not 5 Gooey Ghoul Drool in bags"),
(18, 29856, 55364, 0, 1, 9, 0, 12643, 0, 0, 0, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires quest 'Silver Lining' active"),
(18, 29856, 55364, 0, 1, 2, 0, 38687, 5, 0, 1, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires not 5 Gooey Ghoul Drool in bags"),
(18, 29856, 55363, 0, 0, 9, 0, 12629, 0, 0, 0, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires quest 'You Can Run, But You Can't Hide' active"),
(18, 29856, 55363, 0, 0, 2, 0, 38687, 5, 0, 1, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires not 5 Gooey Ghoul Drool in bags"),
(18, 29856, 55363, 0, 1, 9, 0, 12643, 0, 0, 0, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires quest 'Silver Lining' active"),
(18, 29856, 55363, 0, 1, 2, 0, 38687, 5, 0, 1, 0, 0, "", "spellclick 'Create Ghoul Drool Cover' requires not 5 Gooey Ghoul Drool in bags");

Using spell_scripts causes many issues like not receiving the item due to range or click spam, the SAI solution is more smother IG.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rushor picture Rushor  路  3Comments

Blasphemous picture Blasphemous  路  3Comments

daddycaddy picture daddycaddy  路  3Comments

Jonne733 picture Jonne733  路  3Comments

funjoker picture funjoker  路  3Comments