Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions data/sql/updates/pending_db_world/rev_1764894567538544452.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-- Add creature_text for Stephanie Sindree (31019)
DELETE FROM `creature_text` WHERE `CreatureID` = 31019;
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(31019, 0, 0, 'It wasn''t my food!', 12, 0, 100, 6, 0, 0, 31838, 0, 'Stephanie Sindree - Stephanie Crowd'),
(31019, 1, 0, 'Please, it''s not my fault! If... if I give you a refund, maybe you can speak to a healer? I don''t know what you expect me to do!', 12, 0, 100, 20, 0, 0, 31840, 0, 'Stephanie Sindree - Stephanie Crowd');

-- Add creature_text for Agitated Stratholme Citizen (31126) - Stephanie Crowd
DELETE FROM `creature_text` WHERE `CreatureID` = 31126 AND `GroupID` IN (4, 5, 6);
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(31126, 4, 0, 'My wife and children are sick in bed because of the poison you sold me!', 12, 0, 100, 5, 0, 0, 31837, 0, 'Agitated Stratholme Citizen - Stephanie Crowd'),
(31126, 5, 0, 'Don''t try to weasel out of this!', 12, 0, 100, 25, 0, 0, 31839, 0, 'Agitated Stratholme Citizen - Stephanie Crowd'),
(31126, 6, 0, 'That... no, keep your filthy money! It won''t help my family!', 12, 0, 100, 5, 0, 0, 31842, 0, 'Agitated Stratholme Citizen - Stephanie Crowd');
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ enum Misc
ACTION_FORCE_CHANGE_LOCK = 2,

POINT_CHRONOS = 1,

// Stephanie Sindree crowd
NPC_STEPHANIE_SINDREE = 31019,
SAY_STEPHANIE_CROWD_1 = 4,
SAY_STEPHANIE_CROWD_2 = 5,
SAY_STEPHANIE_CROWD_3 = 6,
SAY_STEPHANIE_RESPONSE_1 = 0,
SAY_STEPHANIE_RESPONSE_2 = 1,
};

enum Events
Expand Down Expand Up @@ -1520,12 +1528,19 @@ class npc_cos_stratholme_citizien : public CreatureScript
pInstance = me->GetInstanceScript();
if (!pInstance || pInstance->GetData(DATA_ARTHAS_EVENT) < COS_PROGRESS_FINISHED_CITY_INTRO)
allowTimer++;

isStephanieCrowd = me->GetEntry() == NPC_CITY_MAN3 && me->GetDistance(2149.56f, 1339.46f, 132.531f) < 10.0f;
stephanieDialogueTimer = isStephanieCrowd ? urand(5000, 15000) : 0;
stephanieDialoguePhase = 0;
}

bool locked;
uint32 changeTimer;
InstanceScript* pInstance;
uint32 allowTimer;
bool isStephanieCrowd;
uint32 stephanieDialogueTimer;
uint8 stephanieDialoguePhase;

void Reset() override
{
Expand Down Expand Up @@ -1586,6 +1601,48 @@ class npc_cos_stratholme_citizien : public CreatureScript
{
ScriptedAI::UpdateAI(diff);

if (isStephanieCrowd && stephanieDialogueTimer)
{
if (stephanieDialogueTimer <= diff)
{
Creature* stephanie = me->FindNearestCreature(NPC_STEPHANIE_SINDREE, 10.0f);
switch (stephanieDialoguePhase)
{
case 0:
Talk(SAY_STEPHANIE_CROWD_1);
stephanieDialogueTimer = 5000;
stephanieDialoguePhase = 1;
break;
case 1:
if (stephanie)
stephanie->AI()->Talk(SAY_STEPHANIE_RESPONSE_1);
stephanieDialogueTimer = 5000;
stephanieDialoguePhase = 2;
break;
case 2:
Talk(SAY_STEPHANIE_CROWD_2);
stephanieDialogueTimer = 5000;
stephanieDialoguePhase = 3;
break;
case 3:
if (stephanie)
stephanie->AI()->Talk(SAY_STEPHANIE_RESPONSE_2);
stephanieDialogueTimer = 8000;
stephanieDialoguePhase = 4;
break;
case 4:
Talk(SAY_STEPHANIE_CROWD_3);
stephanieDialogueTimer = urand(45000, 60000);
stephanieDialoguePhase = 0;
break;
}
}
else
stephanieDialogueTimer -= diff;

return;
}

if (allowTimer)
{
allowTimer += diff;
Expand Down
Loading