fix(DB/Scripts): CoS agitated citizens now talk and emote near Patricia O'Reilly (#24042)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
Co-authored-by: Ludwig <sudlud@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
blinkysc
2026-06-30 11:18:28 -05:00
committed by GitHub
parent 398c69e5aa
commit 2945514f45
2 changed files with 58 additions and 0 deletions

View File

@@ -187,6 +187,10 @@ enum Misc
// Brandon Eiredeck crowd
NPC_BRANDON_EIREDECK = 31023,
SAY_BRANDON_CROWD_AMBIENT = 3,
// Patricia O'Reilly crowd
SAY_AGITATED_CITIZEN_AMBIENT = 2,
SAY_AGITATED_RESIDENT_AMBIENT = 0,
};
enum Events
@@ -1541,6 +1545,10 @@ public:
isBrandonCrowd = me->GetDistance(2267.86f, 1144.93f, 138.403f) < 10.0f;
ambientTalkTimer = isBrandonCrowd ? urand(5000, 15000) : 0;
isPatriciaCrowd = (me->GetEntry() == NPC_CITY_MAN3 || me->GetEntry() == NPC_CITY_MAN4) && me->GetDistance(2372.0f, 1199.0f, 135.0f) < 20.0f;
talkTimer = isPatriciaCrowd ? urand(5000, 10000) : 0;
emoteTimer = isPatriciaCrowd ? urand(1000, 3000) : 0;
}
bool locked;
@@ -1552,6 +1560,9 @@ public:
uint8 stephanieDialoguePhase;
bool isBrandonCrowd;
uint32 ambientTalkTimer;
bool isPatriciaCrowd;
uint32 talkTimer;
uint32 emoteTimer;
void Reset() override
{
@@ -1667,6 +1678,27 @@ public:
return;
}
// Agitated crowd near Patricia - active as soon as instance is loaded
if (isPatriciaCrowd)
{
if (talkTimer <= diff)
{
Talk(me->GetEntry() == NPC_CITY_MAN3 ? SAY_AGITATED_CITIZEN_AMBIENT : SAY_AGITATED_RESIDENT_AMBIENT);
talkTimer = urand(8000, 15000);
}
else
talkTimer -= diff;
if (emoteTimer <= diff)
{
static uint32 const agitatedEmotes[] = { 1, 5, 6, 14, 15, 25, 273, 274, 396 };
me->HandleEmoteCommand(agitatedEmotes[urand(0, 8)]);
emoteTimer = urand(1500, 2500);
}
else
emoteTimer -= diff;
}
if (allowTimer)
{
allowTimer += diff;