TrinityCore / TrinityCore

TrinityCore Open Source MMO Framework (master = 11.0.5.57388, 3.3.5 = 3.3.5a.12340, cata classic = 4.4.1.57294)
http://www.trinitycore.org
GNU General Public License v2.0
9.62k stars 6.06k forks source link

DB/Quest: Pushing Forward (25792) - kill credit does not trigger #16383

Open BahDumbBugs opened 8 years ago

BahDumbBugs commented 8 years ago

Another of the Frostmane Front Quests thats apparently bugged/glitched. http://www.wowhead.com/quest=25792/pushing-forward

Rune of fire http://www.wowhead.com/item=56009 is supposed to burn up the Constriction Totem in the frostmane Front in Dun Morogh, southeast of Kharanos. Again, the action is there - just no registration that anything actually happened; thereby preventing you from progressing in this quest chain.

TrinityCore rev. e1d2d60ec394 2016-01-14 01:33:37 +0100 (6.x branch) (Unix, Release)

nubqt commented 6 years ago

I was able to generate kill credits by creating records in spell_scripts through the spell Burn Constriction Totem. But I'm not sure if #20869 may be affecting the behavior reported in this ticket.

nubqt commented 6 years ago

It seems that this issue should be pushed together with #20869 and #20249. The former would restrict Rune of Fire to be castable on Constriction Totems only, while the latter would allow spell 77314 to use CONDITION_SOURCE_TYPE_SPELL within conditions. Can someone verify if this assessment is correct?

nubqt commented 6 years ago

This is what the solution should look like:

INSERT INTO `spell_scripts` ( 77314, 0, 0, 8, 41202, 1, 0, 0, 0, 0, 0);

which would give the Player a kill credit whenever he uses Rune of Fire. But right now the item spell is not restricted, so if this solution were to be implemented, the Player would get credit by clicking the item regardless of where he is or whether he is targeting a Constriction Totem or not.

ghost commented 6 years ago

The spell will most likely need added conditions for range to be a valid fix. See commit https://github.com/TrinityCore/TrinityCore/commit/ec6e7b618615be16e675d3c081531e5eaddaa89a for examples.

BTW, INSERT INTO solution suggestions should be preceded by a DELETE FROM query to make it repeatable.

DELETE FROM `spell_scripts` WHERE `id`= 77314 AND `datalong`=41202;
INSERT INTO `spell_scripts` (`id`,`effIndex`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
(77314, 0, 0, 8, 41202, 1, 0, 0, 0, 0, 0);
Aokromes commented 6 years ago

spell_scripts where deprecated, better use SAI.

Kodekc commented 6 years ago

So, let's begin

-- DB/Quest: Pushing Forward (ID 25792)
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE  `entry`=41202;
DELETE FROM `smart_scripts` WHERE `entryorguid`=41202 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`, `event_param_string`, `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 
(41202, 0, 0, 0, 1, 0, 100, 0, 0, 0, 0, 0, '', 75, 77311, 2, 0, 0, 0, 0, 19, 41237, 10, 0, 0, 0, 0, 0, 'Constriction Totem - Out of Combat - Cast \'Constriction Totem Aura\''),
(41202, 0, 1, 2, 8, 0, 100, 1, 77314, 0, 0, 0, '', 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Constriction Totem - On Spellhit \'Burn Constriction Totem\' - Die (No Repeat)'),
(41202, 0, 2, 0, 8, 0, 100, 1, 77314, 0, 0, 0, '', 33, 41202, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Constriction Totem - On Spellhit \'Burn Constriction Totem\' - Quest Credit \'Pushing Forward\'(No Repeat)');

DELETE FROM `conditions` WHERE  `SourceTypeOrReferenceId`=13 AND `SourceGroup`=1 AND `SourceEntry`=77314 AND `ConditionTypeOrReference`=31 AND `ConditionValue1`=3 AND `ConditionValue2`=41202;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES 
(13, 1, 77314, 0, 0, 31, 0, 3, 41202, 0, 0, 0, 0, '', 'Spell 77314 targets Constriction Totem 41202');

DELETE FROM `creature_text` WHERE `CreatureID`=41237 AND `GroupID`=0;
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES 
(41237, 0, 1, '%s gasps for air', 16, 0, 100, 0, 0, 0, 41180, 0, 'Kharanos Mountaineer'),
(41237, 0, 2, 'Thank you for freeing me!', 12, 0, 100, 0, 0, 0, 41181, 0, 'Kharanos Mountaineer');

http://www.wowhead.com/npc=41237/kharanos-mountaineer http://www.wowhead.com/npc=41202/constriction-totem http://www.wowhead.com/spell=77314/burn-constriction-totem http://www.wowhead.com/item=56009/rune-of-fire http://ru.wowhead.com/spell=77311/constriction-totem-aura

Kodekc commented 6 years ago

@tkrokli , need help on the third point. I do not have a sniff

ghost commented 6 years ago

Unfortunately, there is no TC archived sniff after Patch 5.0.5 Build 16057, so I can only find creature_template content, which probably already is present in the 720.00 world DB (from Cataclysm & MoP).

This issue is about events in the Warlords of Draenor expansion. I think we need sniffs from other sources, maybe @funjoker can help? I presume it will have to be from current retail, unless someone has got 6.x sniffs.

offl commented 6 years ago

This issue is about events in the Warlords of Draenor expansion.

Cata

ghost commented 6 years ago

Sorry, my bad. For some weird reason, I thought this was about 'Frostfire Ridge'. I must have misread something when looking up the spell ID. I will do my best to look up some sniff info later.

ghost commented 6 years ago
ServerToClient: SMSG_AURA_UPDATE_ALL (0x18EE) Length: 25 ConnIdx: 0 Time: 11/08/2011 22:33:31.000 Number: 24235
GUID: Full: 0xF130A115000E03C7 Type: Creature Entry: 41237 Low: 918471
[0] Slot: 0
[0] Spell ID: 77311 (77311)
[0] Flags: 129 (EffectIndex0, Negative)
[0] Level: 6
[0] Charges: 0
[0] Caster GUID: Full: 0xF130A0F2000E0281 Type: Creature Entry: 41202 Low: 918145

ServerToClient: SMSG_SPELL_START (0xCE43) Length: 33 ConnIdx: 0 Time: 11/08/2011 22:33:31.000 Number: 24249
Caster GUID: Full: 0xF130A0F2000E0281 Type: Creature Entry: 41202 Low: 918145
Caster Unit GUID: Full: 0xF130A0F2000E0281 Type: Creature Entry: 41202 Low: 918145
Cast Count: 0
Spell ID: 77311 (77311)
Cast Flags: 2 (HasTrajectory)
Time: 0
Target Flags: 0 (Self)

ServerToClient: SMSG_SPELL_GO (0x0A53) Length: 49 ConnIdx: 0 Time: 11/08/2011 22:33:31.000 Number: 24250
Caster GUID: Full: 0xF130A0F2000E0281 Type: Creature Entry: 41202 Low: 918145
Caster Unit GUID: Full: 0xF130A0F2000E0281 Type: Creature Entry: 41202 Low: 918145
Cast Count: 0
Spell ID: 77311 (77311)
Cast Flags: 16640 (Unknown7, Unknown12)
Time: 2233048299
Hit Count: 0
Miss Count: 0
Target Flags: 34 (Unit, SourceLocation)
Target GUID: 0x0
Source Transport GUID: 0x0
Source Position: X: -5783.986 Y: -639.507 Z: 397.8594

ServerToClient: SMSG_AURA_UPDATE_ALL (0x18EE) Length: 25 ConnIdx: 0 Time: 11/08/2011 22:34:10.000 Number: 25460
GUID: Full: 0xF130A115000DC55B Type: Creature Entry: 41237 Low: 902491
[0] Slot: 0
[0] Spell ID: 77311 (77311)
[0] Flags: 129 (EffectIndex0, Negative)
[0] Level: 6
[0] Charges: 0
[0] Caster GUID: Full: 0xF130A0F2000DC7D6 Type: Creature Entry: 41202 Low: 903126

ServerToClient: SMSG_AURA_UPDATE_ALL (0x18EE) Length: 25 ConnIdx: 0 Time: 11/08/2011 22:34:10.000 Number: 25461
GUID: Full: 0xF130A115000E2747 Type: Creature Entry: 41237 Low: 927559
[0] Slot: 0
[0] Spell ID: 77311 (77311)
[0] Flags: 129 (EffectIndex0, Negative)
[0] Level: 8
[0] Charges: 0
[0] Caster GUID: Full: 0xF130A0F2000E25B4 Type: Creature Entry: 41202 Low: 927156

ServerToClient: SMSG_AURA_UPDATE_ALL (0x18EE) Length: 25 ConnIdx: 0 Time: 11/08/2011 22:34:10.000 Number: 25462
GUID: Full: 0xF130A115000E2833 Type: Creature Entry: 41237 Low: 927795
[0] Slot: 0
[0] Spell ID: 77311 (77311)
[0] Flags: 129 (EffectIndex0, Negative)
[0] Level: 8
[0] Charges: 0
[0] Caster GUID: Full: 0xF130A0F2000E27AB Type: Creature Entry: 41202 Low: 927659

ServerToClient: SMSG_CHAT (0x5E52) Length: 96 ConnIdx: 0 Time: 11/08/2011 22:34:15.000 Number: 25620
Type: 16 (MonsterEmote)
Language: 0 (Universal)
GUID: Full: 0xF130A115000E03C7 Type: Creature Entry: 41237 Low: 918471
Constant time: 0
Name Length: 21
Name: Kharanos Mountaineer
Receiver GUID: Full: 0xF130A0F2000E0281 Type: Creature Entry: 41202 Low: 918145
Receiver Name Length: 19
Receiver Name: Constriction Totem
Text Length: 18
Text: %s gasps for air.
Chat Tag: 32 (32)

ServerToClient: SMSG_CHAT (0x5E52) Length: 104 ConnIdx: 0 Time: 11/08/2011 22:34:17.000 Number: 25715
Type: 12 (MonsterSay)
Language: 0 (Universal)
GUID: Full: 0xF130A115000E03C7 Type: Creature Entry: 41237 Low: 918471
Constant time: 0
Name Length: 21
Name: Kharanos Mountaineer
Receiver GUID: Full: 0xF130A0F2000E0281 Type: Creature Entry: 41202 Low: 918145
Receiver Name Length: 19
Receiver Name: Constriction Totem
Text Length: 26
Text: Thank you for freeing me!
Chat Tag: 32 (32)

-- if I forgot to include something, please do tell.

Kodekc commented 6 years ago

What will BroadcastTextId?

ghost commented 6 years ago
SELECT * FROM `hotfixes`.`broadcast_text` WHERE `FemaleText` IN ('Thank you for freeing me!','%s gasps for air.');
   ID  MaleText                   FemaleText                 EmoteID1  EmoteID2  EmoteID3  EmoteDelay1  EmoteDelay2  EmoteDelay3  UnkEmoteID  Language    Type  SoundID1  SoundID2  PlayerConditionID  VerifiedBuild
-----  -------------------------  -------------------------  --------  --------  --------  -----------  -----------  -----------  ----------  --------  ------  --------  --------  -----------------  -------------
41180  %s gasps for air.          %s gasps for air.                 0         0         0            0            0            0           0         0       1         0         0                  0          25549
41181  Thank you for freeing me!  Thank you for freeing me!         0         0         0            0            0            0           5         0       1         0         0                  0          25549
Kodekc commented 6 years ago

I tried various manipulations with the spell (ID 77311), and I can not do it the way it works in the original. Which event_type is right?

ghost commented 6 years ago

Maybe you could post a prototype description of what is supposed to happen, so others may suggest what should be used. Or is this something visible in sniff, that I should post a new snippet from the sniff to see what happens in particular moments of the event?

Kodekc commented 6 years ago

Constriction Totem casts a spell on Kharanos Mountaineer. When the totem dies, the aura is removed and it speaks the text. After working the scripts, NPC (Kharanos Mountaineer) despawn.

ghost commented 6 years ago

About the event_type and auras - is it helpful to look at https://github.com/TrinityCore/TrinityCore/pull/21358/files/0141ba4a8047218ee9564d6891b3b22f4a76fcdd..a5b1c1828312394a2893ef8e7d656cd1df145cbc where Gooyeth changed the action_type from 11 (SMART_ACTION_CAST) to 75 (SMART_ACTION_ADD_AURA) ?


edit: I probably misunderstood something, you may want to look at event_type 23 (SMART_EVENT_HAS_AURA) and action_type 28 (SMART_ACTION_REMOVEAURASFROMSPELL).

Kodekc commented 6 years ago

Aura imposes, but there is no animation in the totem, I'm a fucking perfectionist :-D

ghost commented 6 years ago

Some times the animations can be hard to find. Not sure if animation spell is visible in sniffs, so any suggestions are welcome.