diff --git a/sql/scriptdev2/scriptdev2.sql b/sql/scriptdev2/scriptdev2.sql index 26ea42bc58..d7a28cbbd0 100644 --- a/sql/scriptdev2/scriptdev2.sql +++ b/sql/scriptdev2/scriptdev2.sql @@ -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'), diff --git a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/stormwind_city.cpp b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/stormwind_city.cpp index 854d155063..28d30debce 100644 --- a/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/stormwind_city.cpp @@ -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, @@ -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; @@ -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); } @@ -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)) @@ -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);