fix(Core/Creature): Fixed GroupAI flags usage in creature_formations (#7544)

* fix(Core/Creature): Fixed GroupAI flags usage

* fix(Core/Creature): build fix + code style...

* fix(Core/Creatures): trailing white spaces...

* Core/Formations: allow only certain members to have follow formation

* Core/Formations: fixed ancient data corruption in CreatureGroup::LeaderMoveTo

* Core/Formations: minor optimization

* Core/Formations: improved some warning messages

* Core/Formations: do not load invalid formation data which has unsupported group ai

* Core/Formations: minor adjust for recent commit

* Core/Formations: log formation data which has angle and distance but dont have GROUP_AI_FLAG_FOLLOW_LEADER flag

* Core/Formations: Minor optimization for formation data handling

* Core/Formations: make sure that FormationInfo members are always initialized on its creation

* Core/Formations: minor warnings adjustments

* DB/Formations: fixed some warnings

* Core/Formations: check group flags only if there is any
I have gues that maybe leader could not assist any member at all but members maybe could be linked for motion

* DB/Formations: fixed rest of DB warnings

* Core/Formations: more improvements for supported AI mask check

* Core/Formations: more improvements for data checks

* DB/Formations: fixed warnings

* meh

* DB/Formations: minor correction

* Core/Formations: code style - brackets, you suck... :D
This commit is contained in:
Andrius Peleckas
2021-09-24 20:51:55 +03:00
committed by GitHub
parent 5d08c6c64b
commit e6b1201e50
5 changed files with 177 additions and 89 deletions

View File

@@ -0,0 +1,17 @@
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1631783274789936800');
-- Warning fixes
UPDATE creature_formations SET groupAI=groupAI|512 WHERE (angle > 0 OR dist > 0) AND leaderGUID != memberGUID and NOT (groupAI & 512);
update creature_formations set angle=0, dist=0 where leaderGUID=7209 and memberGUID=7209;
update creature_formations set angle=0, dist=0 where leaderGUID=37523 and memberGUID=37523;
update creature_formations set angle=0, dist=0 where leaderGUID=47613 and memberGUID=47613;
update creature_formations set angle=0, dist=0 where leaderGUID=79524 and memberGUID=79524;
update creature_formations set angle=0, dist=0 where leaderGUID=79720 and memberGUID=79720;
update creature_formations set angle=0, dist=0 where leaderGUID=80219 and memberGUID=80219;
update creature_formations set angle=0, dist=0 where leaderGUID=80235 and memberGUID=80235;
update creature_formations set angle=0, dist=0 where leaderGUID=134935 and memberGUID=134935;
update creature_formations set angle=0, dist=0 where leaderGUID=134944 and memberGUID=134944;
update creature_formations set angle=0, dist=0 where leaderGUID=134952 and memberGUID=134952;
update creature_formations set groupAI = 1 | 2 where leaderGUID=85221 and memberGUID=85221;
update creature_formations set groupAI = 1 | 2 where leaderGUID=114937 and memberGUID=114937;
update creature_formations set groupAI = 1 | 2 where leaderGUID=248035 and memberGUID != 248035;