Skip to content
Permalink
Browse files

Core/CreatureGroups: Fix formation following

  • Loading branch information...
AbraKabastard committed May 24, 2019
1 parent 2816d03 commit 284289007c2611d56637915adb4b97b1c871b22c
Showing with 7 additions and 2 deletions.
  1. +5 −0 sql/updates/world/2019_05_24_formations.sql
  2. +2 −2 src/game/CreatureGroups.h
@@ -0,0 +1,5 @@
UPDATE `creature_formations` SET `groupAI`=7 WHERE `groupAI`=2; -- members attack and members follow the leader
UPDATE `creature_formations` SET `groupAI`=4 WHERE `groupAI`=0; -- members follow the leader
UPDATE `creature_formations` SET `groupAI`=5 WHERE `groupAI`=1; -- The members aggroes if the leader aggroes and members follow the leader

UPDATE `creature_formations` SET `groupAI`=(`groupAI`&~0x004)|0x200 WHERE `groupAI`&0x004;
@@ -31,7 +31,7 @@ enum GroupAIFlags
FLAG_MEMBERS_ASSIST_LEADER = 0x00000001, // The member aggroes if the leader aggroes
FLAG_LEADER_ASSISTS_MEMBER = 0x00000002, // The leader aggroes if the member aggroes
FLAG_MEMBERS_ASSIST_MEMBER = (FLAG_MEMBERS_ASSIST_LEADER | FLAG_LEADER_ASSISTS_MEMBER), // every member will assist if any member is attacked
FLAG_IDLE_IN_FORMATION = 0x00000004, // The member will follow the leader when pathing idly
FLAG_IDLE_IN_FORMATION = 0x00000200, // The member will follow the leader when pathing idly
};

class Creature;
@@ -42,7 +42,7 @@ struct FormationInfo
uint32 leaderGUID;
float follow_dist;
float follow_angle;
uint8 groupAI;
uint32 groupAI;
uint32 point_1;
uint32 point_2;
};

0 comments on commit 2842890

Please sign in to comment.
You can’t perform that action at this time.