Skip to content

fix(SmartAI): update docs for SMART_ACTION_FOLLOW#3668

Merged
Helias merged 1 commit into
azerothcore:masterfrom
sogladev:smart-action-follow
Jan 17, 2026
Merged

fix(SmartAI): update docs for SMART_ACTION_FOLLOW#3668
Helias merged 1 commit into
azerothcore:masterfrom
sogladev:smart-action-follow

Conversation

@sogladev

Copy link
Copy Markdown
Member

rename confusing CreditCreatureId field, and clarify what CreditType should be set to

wiki docs SMART_ACTION_FOLLOW are OK https://www.azerothcore.org/wiki/smart_scripts

relevant cpp

void SmartAI::StopFollow(bool complete)
{
    mFollowGuid.Clear();
    mFollowDist = 0;
    mFollowAngle = 0;
    mFollowCredit = 0;
    mFollowArrivedTimer = 1000;
    mFollowArrivedEntry = 0;
    mFollowCreditType = 0;

    me->GetMotionMaster()->Clear(false);
    me->StopMoving();
    me->GetMotionMaster()->MoveIdle();

    if (!complete)
        return;

    Player* player = ObjectAccessor::GetPlayer(*me, mFollowGuid);
    if (player)
    {
        if (!mFollowCreditType)
            player->RewardPlayerAndGroupAtEvent(mFollowCredit, me);
        else
            player->GroupEventHappens(mFollowCredit, me);
    }

rename confusing `CreditCreatureId` field, and clarify what CreditType
should be set to
@Helias Helias merged commit af1f98c into azerothcore:master Jan 17, 2026
12 checks passed
@Helias

Helias commented Jan 17, 2026

Copy link
Copy Markdown
Member

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants