TrinityCore icon indicating copy to clipboard operation
TrinityCore copied to clipboard

Twisting Blade does not work properly

Open iThorgrim opened this issue 11 months ago • 4 comments

Description

The following spell : Twisting Blade, usable from the following vehicle : Xink's Shredder kills the player when he uses it.

Expected behaviour

The spell should never target the player if has no target.

Steps to reproduce the problem

  • Give yourself the following quest: 12050
  • Teleport here: .go xyz 4805.19 773.63 165 571
  • Use the following item: Xink's Shredder Control Device
  • Enter in the vehicle and cast spell number 1

Branch

3.3.5

TC rev. hash/commit

4bec94451fb239a4e2007413b5691ed19fea6981

Operating system

Windows 11 x64, Debian 12 x64

Custom changes

Nothing

iThorgrim avatar Jan 29 '25 12:01 iThorgrim

I've tried to add a condition to TrinityCore's conditions table, as shown here:

INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES ('17', '0', '47938', '0', '0', '33', '1', '0', '0', '0', '1', '0', '0', '', '');

But it seems that TrinityCore doesn't handle well the combo between SourceTypeOrReferenceID 17 and CondtionTypeOrReference 33.

iThorgrim avatar Jan 29 '25 12:01 iThorgrim

we can combine that with something like this to get the expected result :

DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 47938) AND (`SourceId` = 0) AND (`ElseGroup` = 0) AND (`ConditionTypeOrReference` = 32) AND (`ConditionTarget` = 1) AND (`ConditionValue1` = 16) AND (`ConditionValue2` = 0) AND (`ConditionValue3` = 0);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(17, 0, 47938, 0, 0, 32, 1, 16, 0, 0, 1, 0, 0, '', '');

CraftedRO avatar Jan 29 '25 16:01 CraftedRO

@offl any insight here ?

CraftedRO avatar Dec 01 '25 21:12 CraftedRO

Dunno how it should be handled Should be good as temp solution

offl avatar Dec 01 '25 21:12 offl