Skip to content

Commit

Permalink
Stormwind: Add detail to dashel stonefist
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Nov 5, 2023
1 parent a80a899 commit 21d5cd8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sql/scriptdev2/scriptdev2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2550,8 +2550,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadc
('-1001272','Light grant me strength!','0','1','0','0','18405','SAY_KAYLAAN_8'),
('-1001273','Oh, please! This is sickening; I''m going to have to kill you all myself.','0','1','0','0','18406','SAY_SOCRETHAR_6'),
('-1001274','Now you''re gonna get it good, $N!','0','0','0','0','1961','dashel stonefist SAY_STONEFIST_1'),
('-1001275','Okay, okay! Enough fighting. No one else needs to get hurt.','0','0','0','0','1712','dashel stonefist SAY_STONEFIST_2'),
('-1001276','It''s okay, boys. Back off. You''ve done enough. I''ll meet up with you later.','0','0','0','0','1713','dashel stonefist SAY_STONEFIST_3'),
('-1001275','Okay, okay! Enough fighting. No one else needs to get hurt.','0','0','0','20','1712','dashel stonefist SAY_STONEFIST_2'),
('-1001276','It''s okay, boys. Back off. You''ve done enough. I''ll meet up with you later.','0','0','0','1','1713','dashel stonefist SAY_STONEFIST_3'),
('-1001277','That could have gone better, $n. Come, I have something for you.','0','4','0','0','19200','Ambassador Sunsorrow - During Lament of the Highborne script'),
('-1001278','Who calls me to this world? The stars are not yet aligned... my powers fail me! You will pay for this!','0','0','0','1','21639','Terokk SAY_SPAWN'),
('-1001279','Show me what you''re made of, $n!','0','6','0','1','21327','Terokk SAY_CHOSEN_ONE'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ UnitAI* GetAI_npc_bartleby(Creature* pCreature)
enum
{
QUEST_MISSING_DIPLO_PT8 = 1447,
FACTION_HOSTILE = 168,
FACTION_HOSTILE = 7,
NPC_OLD_TOWN_THUG = 4969,

SPELL_UNKILLABLE_OFF = 13835,

SAY_STONEFIST_1 = -1001274,
SAY_STONEFIST_2 = -1001275,
SAY_STONEFIST_3 = -1001276,
Expand All @@ -112,7 +114,6 @@ struct npc_dashel_stonefistAI : public CombatAI
AddTimerlessCombatAction(DASHEL_LOW_HP, true);
AddCustomAction(DASHEL_START_EVENT, true, [&]() { HandleStartEvent(); });
AddCustomAction(DASHEL_END_EVENT, true, [&]() { HandleEndEvent(); });
SetDeathPrevention(true);
}

ObjectGuid m_playerGuid;
Expand All @@ -121,6 +122,11 @@ struct npc_dashel_stonefistAI : public CombatAI
{
CombatAI::Reset();
SetReactState(REACT_PASSIVE);
}

void JustRespawned() override
{
CombatAI::Reset();
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PLAYER);
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
}
Expand All @@ -135,6 +141,7 @@ struct npc_dashel_stonefistAI : public CombatAI
{
if (Player* player = m_creature->GetMap()->GetPlayer(m_playerGuid))
{
SetDeathPrevention(true);
AttackStart(player);

if (Creature* thug = m_creature->SummonCreature(NPC_OLD_TOWN_THUG, -8672.33f, 442.88f, 99.98f, 3.5f, TEMPSPAWN_DEAD_DESPAWN, 300000))
Expand All @@ -147,7 +154,12 @@ struct npc_dashel_stonefistAI : public CombatAI

void HandleEndEvent()
{
SetDeathPrevention(false);
DoScriptText(SAY_STONEFIST_3, m_creature);
m_creature->CastSpell(nullptr, SPELL_UNKILLABLE_OFF, TRIGGERED_OLD_TRIGGERED);

m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PLAYER);
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);

if (Player* player = m_creature->GetMap()->GetPlayer(m_playerGuid))
player->AreaExploredOrEventHappens(QUEST_MISSING_DIPLO_PT8);
Expand Down

0 comments on commit 21d5cd8

Please sign in to comment.