Trinitycore: DB/Quest/GameObject: Entry Into Karazhan (9831)

Created on 21 Dec 2017  路  13Comments  路  Source: TrinityCore/TrinityCore

Description:
http://www.wowhead.com/quest=9831/entry-into-karazhan
http://www.wowhead.com/object=182196/arcane-container
http://www.wowhead.com/object=182197/arcane-container
http://www.wowhead.com/object=182198/arcane-container

Current behaviour:
You can activate this object an infinite amount of times, spawning an infinite amount of Guardians. When spawned, the Guardians don't agro and it spawns in the wrong place. Picking up the Key Fragment quest item disables activation of the container inside Shadow Lab, but the object is always active inside Arcatraz.

wowscrnshot_122117_024512

Expected behaviour:
https://youtu.be/5zciQcZoi7g?t=763

The container should despawn when activated, and the Guardian should spawn in the exact spot as the container and begin fighting you.

Branch(es): 3.3.5

TC rev. hash/commit: 7cc074f2a48d

TDB version: 335.63

Operating system: Windows 10

Comp-Database Feedback-PatchFix Sub-GameObject Sub-Instances Sub-Quests

Most helpful comment

This fixes the issue with the gameobject not properly despawning, this time without changing data (except data2 because I removed the event_script).

-- Remove event_scripts
DELETE FROM `event_scripts` WHERE `id` IN (14592, 14593, 14595);

-- Arcane Container SAI
SET @ENTRY := 182196;
UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI", `Data2`=0 WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=1;
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
(@ENTRY,1,0,1,70,0,100,6,2,0,0,0,12,22890,3,240000,1,0,0,8,0,0,0,-108.252,-510.302,21.4761,2.9688,"Arcane Container - On Gameobject State Changed - Summon Creature 'First Fragment Guardian' (Dungeon)"),
(@ENTRY,1,1,0,61,0,100,0,2,0,0,0,41,0,300,0,0,0,0,1,0,0,0,0,0,0,0,"Arcane Container - On Gameobject State Changed - Respawn Self (Dungeon)");

-- Arcane Container SAI
SET @ENTRY := 182197;
UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI", `Data2`=0 WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=1;
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
(@ENTRY,1,0,1,70,0,100,6,2,0,0,0,12,22891,3,240000,1,0,0,8,0,0,0,19.6039,-304.914,-66.1715,3.4178,"Arcane Container - On Gameobject State Changed - Summon Creature 'Second Fragment Guardian' (Dungeon)"),
(@ENTRY,1,1,0,61,0,100,0,2,0,0,0,41,0,300,0,0,0,0,1,0,0,0,0,0,0,0,"Arcane Container - On Gameobject State Changed - Respawn Self (Dungeon)");

-- Arcane Container SAI
SET @ENTRY := 182198;
UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI", `Data2`=0 WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=1;
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
(@ENTRY,1,0,1,70,0,100,6,2,0,0,0,12,22892,3,240000,1,0,0,8,0,0,0,320.304,-21.8057,22.4412,2.0042,"Arcane Container - On Gameobject State Changed - Summon Creature 'Third Fragment Guardian' (Dungeon)"),
(@ENTRY,1,1,0,61,0,100,0,2,0,0,0,41,0,300,0,0,0,0,1,0,0,0,0,0,0,0,"Arcane Container - On Gameobject State Changed - Respawn Self (Dungeon)");

All 13 comments

I think this should fix the issue:

-- Update First Fragment Guardian to spawn correctly
UPDATE `event_scripts` SET `x`=-108.252, `y`=-510.302, `z`=21.4761, `o`=2.9688 WHERE `id`=14592;

-- Update Arcane Container to despawn after using
UPDATE `gameobject_template` SET `Data3`=0, `Data5`=1 WHERE `entry`=182196;

Tested it ingame and it works, I don't have a lot of experience with fixing GOs tho so let me know if something is wrong 馃槃

changing data? without sniff is hack.
plus event_scripts must die.

So the best way of doing it would be to get rid of the event_script and rewrite it in SAI?

Yes plz, non smart_scripts must be converted when possible.

This is not limited to the Arcane Container within Shadow Labs next to Murmur, the other Arcane Containers have very similar issues.

OK, we will see when a suggested solution gets posted and then check if it can be applied to the other containers (which ones?).

https://wow.gamepedia.com/Quest:Entry_Into_Karazhan#Patch_changes :

  • Legion Patch 7.1.0 (2016-10-25): Removed.

I updated the issue with links to each affected object for the related quests.

@tkrokli Thats how far I am right now:

-- Remove event_script
DELETE FROM `event_scripts` WHERE `id`=14592;

-- Arcane Container SAI
SET @ENTRY := 182196;
UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=1;
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
(@ENTRY,1,0,1,70,0,100,6,2,0,0,0,12,22890,3,300000,1,0,0,8,0,0,0,-108.252,-510.302,21.4761,2.9688,"Arcane Container - On Gameobject State Changed - Summon Creature 'First Fragment Guardian' (Dungeon)"),
(@ENTRY,1,1,0,61,0,100,0,0,0,0,0,70,43200,0,0,0,0,0,1,0,0,0,0,0,0,0,"Arcane Container - On Gameobject State Changed - Respawn Self (Dungeon)");

The problem is that the despawn using ACTION_RESPAWN_TARGET only works if you set the consumable flag (Data5 in gameobject_template) to 1, couldn't find any other way of despawning/respawning the gameobject.

Quest 5581 has the same issue with the gameobject not properly despawning.

Very well, fair enough. Maybe one of the more experienced TC members (or any other experienced user) knows how to solve that puzzle. Maybe the sniffed values need to be rechecked.

@Serpaa now that some gameobjects handling changed maybe you can test if it can be done without alter wdb data.

This fixes the issue with the gameobject not properly despawning, this time without changing data (except data2 because I removed the event_script).

-- Remove event_scripts
DELETE FROM `event_scripts` WHERE `id` IN (14592, 14593, 14595);

-- Arcane Container SAI
SET @ENTRY := 182196;
UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI", `Data2`=0 WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=1;
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
(@ENTRY,1,0,1,70,0,100,6,2,0,0,0,12,22890,3,240000,1,0,0,8,0,0,0,-108.252,-510.302,21.4761,2.9688,"Arcane Container - On Gameobject State Changed - Summon Creature 'First Fragment Guardian' (Dungeon)"),
(@ENTRY,1,1,0,61,0,100,0,2,0,0,0,41,0,300,0,0,0,0,1,0,0,0,0,0,0,0,"Arcane Container - On Gameobject State Changed - Respawn Self (Dungeon)");

-- Arcane Container SAI
SET @ENTRY := 182197;
UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI", `Data2`=0 WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=1;
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
(@ENTRY,1,0,1,70,0,100,6,2,0,0,0,12,22891,3,240000,1,0,0,8,0,0,0,19.6039,-304.914,-66.1715,3.4178,"Arcane Container - On Gameobject State Changed - Summon Creature 'Second Fragment Guardian' (Dungeon)"),
(@ENTRY,1,1,0,61,0,100,0,2,0,0,0,41,0,300,0,0,0,0,1,0,0,0,0,0,0,0,"Arcane Container - On Gameobject State Changed - Respawn Self (Dungeon)");

-- Arcane Container SAI
SET @ENTRY := 182198;
UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI", `Data2`=0 WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=1;
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
(@ENTRY,1,0,1,70,0,100,6,2,0,0,0,12,22892,3,240000,1,0,0,8,0,0,0,320.304,-21.8057,22.4412,2.0042,"Arcane Container - On Gameobject State Changed - Summon Creature 'Third Fragment Guardian' (Dungeon)"),
(@ENTRY,1,1,0,61,0,100,0,2,0,0,0,41,0,300,0,0,0,0,1,0,0,0,0,0,0,0,"Arcane Container - On Gameobject State Changed - Respawn Self (Dungeon)");

Thank you for your persistence and patience, @Serpaa . Looking forward to test the result.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chilito picture chilito  路  3Comments

Jildor picture Jildor  路  3Comments

Teppic1 picture Teppic1  路  3Comments

Lopfest picture Lopfest  路  3Comments

daddycaddy picture daddycaddy  路  3Comments