Skip to content

Commit

Permalink
Add texts to Ethereum Prison script
Browse files Browse the repository at this point in the history
  • Loading branch information
Grz3s authored and killerwife committed Jun 11, 2017
1 parent b0f3ff8 commit 57a73f5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
12 changes: 6 additions & 6 deletions sql/scriptdev2/scriptdev2.sql
Expand Up @@ -1778,12 +1778,12 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen

(-1000175,'Thank you, mortal.',0,0,11,0,' SAY_JUST_EATEN'),

(-1000176,'REUSE ME',0,0,0,0,'REUSE_ME'),
(-1000177,'REUSE ME',0,0,0,0,'REUSE_ME'),
(-1000178,'REUSE ME',0,0,0,0,'REUSE_ME'),
(-1000179,'REUSE ME',0,0,0,0,'REUSE_ME'),
(-1000180,'REUSE ME',0,0,0,0,'REUSE_ME'),
(-1000181,'REUSE ME',0,0,0,0,'REUSE_ME'),
(-1000176,'What is this? Where am I? How... How did I... Cursed ethereals! I was on an escort mission out of Shattrath when we were ambushed! I must return to the city at once! Your name will be recorded as a friend of the Lower City, $n.',0,0,0,0,'SAY_LC'),
(-1000177,'Blessed Light! Free of my confines at last... Thank you, hero. A\'dal will be told of your heroics.',0,0,0,0,'SAY_SHAT'),
(-1000178,'At last I am released! Thank you, gentle $r. I must return to the expedition at once! They will know of your deeds. This I vow.',0,0,0,0,'SAY_CE'),
(-1000179,'I will tell the tale of your heroics to Haramad myself! All Consortium will know your name, $n. Thank you, my friend.',0,0,0,0,'SAY_CON'),
(-1000180,'The Keepers of Time thank you for your assistance. The Timeless One shall be pleased with this outcome...',0,0,0,0,'SAY_KT'),
(-1000181,'$R save me! Thank you! My people thank you too!',0,0,0,0,'SAY_SPOR'),
(-1000182,'REUSE ME',0,0,0,0,'REUSE_ME'),
(-1000183,'REUSE ME',0,0,0,0,'REUSE_ME'),

Expand Down
26 changes: 19 additions & 7 deletions src/game/AI/ScriptDevAI/scripts/world/go_scripts.cpp
Expand Up @@ -52,7 +52,14 @@ enum
SPELL_REP_CE = 39460,
SPELL_REP_CON = 39474,
SPELL_REP_KT = 39475,
SPELL_REP_SPOR = 39476
SPELL_REP_SPOR = 39476,

SAY_LC = -1000176,
SAY_SHAT = -1000177,
SAY_CE = -1000178,
SAY_CON = -1000179,
SAY_KT = -1000180,
SAY_SPOR = -1000181
};

const uint32 uiNpcPrisonEntry[] =
Expand All @@ -75,16 +82,21 @@ bool GOUse_go_ethereum_prison(Player* pPlayer, GameObject* pGo)

if (FactionTemplateEntry const* pFaction = pCreature->getFactionTemplateEntry())
{
int32 textId = 0;

switch (pFaction->faction)
{
case FACTION_LC: uiSpell = SPELL_REP_LC; break;
case FACTION_SHAT: uiSpell = SPELL_REP_SHAT; break;
case FACTION_CE: uiSpell = SPELL_REP_CE; break;
case FACTION_CON: uiSpell = SPELL_REP_CON; break;
case FACTION_KT: uiSpell = SPELL_REP_KT; break;
case FACTION_SPOR: uiSpell = SPELL_REP_SPOR; break;
case FACTION_LC: uiSpell = SPELL_REP_LC; textId = SAY_LC; break;
case FACTION_SHAT: uiSpell = SPELL_REP_SHAT; textId = SAY_SHAT; break;
case FACTION_CE: uiSpell = SPELL_REP_CE; textId = SAY_CE; break;
case FACTION_CON: uiSpell = SPELL_REP_CON; textId = SAY_CON; break;
case FACTION_KT: uiSpell = SPELL_REP_KT; textId = SAY_KT; break;
case FACTION_SPOR: uiSpell = SPELL_REP_SPOR; textId = SAY_SPOR; break;
}

if (textId)
DoScriptText(textId, pCreature, pPlayer);

if (uiSpell)
pCreature->CastSpell(pPlayer, uiSpell, TRIGGERED_NONE);
else
Expand Down

0 comments on commit 57a73f5

Please sign in to comment.