Trinitycore: Issue when Sindragosa flies

Created on 31 Aug 2018  路  5Comments  路  Source: TrinityCore/TrinityCore

Description:
In combat, when Sindragosa flies, she somehow goes 'underground'.
She should fly up.

I "fixed" it adding:

DELETE FROM `creature_template_movement` WHERE `CreatureId`='36853' and `Flight`='2';
DELETE FROM `creature_template_movement` WHERE `CreatureId`='38265' and `Flight`='2';
DELETE FROM `creature_template_movement` WHERE `CreatureId`='38266' and `Flight`='2';
DELETE FROM `creature_template_movement` WHERE `CreatureId`='38267' and `Flight`='2';

INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`) VALUES ('36853', '0', '0', '2', '0');
INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`) VALUES ('38265', '0', '0', '2', '0');
INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`) VALUES ('38266', '0', '0', '2', '0');
INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`) VALUES ('38267', '0', '0', '2', '0');

I hope this is good enough to help fixing this issue.

Branch: 3.3.5a
TC rev: c00a2ef
TDB: 335.64
OS: Debian 9 / Windows 8.1

Branch-3.3.5a Comp-Database Feedback-PatchFix

Most helpful comment

Looks correct to me.

All 5 comments

Even if it may be a hack-fix, here is a more efficient way to write those queries:

DELETE FROM `creature_template_movement` WHERE `Flight`= 2 AND `CreatureId` IN (36853, 38265, 38266, 38267);
INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`) VALUES
(36853, 0, 0, 2, 0),
(38265, 0, 0, 2, 0),
(38266, 0, 0, 2, 0),
(38267, 0, 0, 2, 0);

@illfated You are right and thank you!
I just copied the automatic queries that MySQL Workbench makes when applying changes.

Sure, your code sample will do the same thing, but the TrinityCore SQL codestyle rules are there to make sure that you know how to write the queries yourself (like the codestyle correction I posted above).

The main reason to work on TrinityCore source code is to learn more about how the source works and how to apply standard rules to the coding.

Thank you again.
I will read more about it.
There is not much that I can actually help with more than making reports, but I hope to learn and improve to provide good solutions

Looks correct to me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Blasphemous picture Blasphemous  路  3Comments

daddycaddy picture daddycaddy  路  3Comments

jerbookins picture jerbookins  路  3Comments

Rushor picture Rushor  路  3Comments

Jonne733 picture Jonne733  路  3Comments