feat(Core/SmartAI): Implement SMART_ACTION_FOLLOW_GROUP (#17033)

* Update SmartScript.cpp

* INIT

* add as coauthor as well :)

Co-Authored-By: cyberium <346907+cyberium@users.noreply.github.com>

* codestyle

* test?

---------

Co-authored-by: cyberium <346907+cyberium@users.noreply.github.com>
This commit is contained in:
Gultask
2023-08-22 07:11:21 -03:00
committed by GitHub
parent 06a2f4093c
commit e42f43784c
3 changed files with 116 additions and 1 deletions

View File

@@ -742,8 +742,9 @@ enum SMART_ACTION
SMART_ACTION_SET_SCALE = 227, // scale
SMART_ACTION_SUMMON_RADIAL = 228, // summonEntry, summonDuration, repetitions, startAngle, stepAngle, dist
SMART_ACTION_PLAY_SPELL_VISUAL = 229, // visualId, visualIdImpact
SMART_ACTION_FOLLOW_GROUP = 230, // followState, followType, dist
SMART_ACTION_AC_END = 230, // placeholder
SMART_ACTION_AC_END = 231, // placeholder
};
enum class SmartActionSummonCreatureFlags
@@ -1445,6 +1446,13 @@ struct SmartAction
{
uint32 visualId;
} spellVisual;
struct
{
uint32 followState;
uint32 followType;
uint32 dist;
} followGroup;
//! Note for any new future actions
//! All parameters must have type uint32
@@ -1883,6 +1891,16 @@ enum SmartCastFlags
SMARTCAST_THREATLIST_NOT_SINGLE = 0x80 //Only cast if the source's threatlist is higher than one. This includes pets (see Skeram's True Fulfillment)
};
enum SmartFollowType
{
FOLLOW_TYPE_CIRCLE = 1, // 360 degrees around leader, 90 degrees is the maximum angle
FOLLOW_TYPE_SEMI_CIRCLE_BEHIND = 2, // 180 degrees behind leader
FOLLOW_TYPE_SEMI_CIRCLE_FRONT = 3, // 180 degrees in front of leader
FOLLOW_TYPE_LINE = 4, // front -> back -> front -> back
FOLLOW_TYPE_COLUMN = 5, // left -> right -> left -> right
FOLLOW_TYPE_ANGULAR = 6 // geese-like formation 135 and 225 degrees behind leader
};
// one line in DB is one event
struct SmartScriptHolder
{