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
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.
Most helpful comment
Looks correct to me.