diff options
| author | Gacko <gacko28@gmx.de> | 2012-11-26 15:32:30 +0100 |
|---|---|---|
| committer | Gacko <gacko28@gmx.de> | 2012-11-26 22:55:12 +0100 |
| commit | 7accb42cc4e6959586dd783c2b3a542faf1f2018 (patch) | |
| tree | 73c5785437dbcd12122efc5850bd10fd92df291c /src/server/scripts/EasternKingdoms/ScarletEnclave | |
| parent | 1ff6b10fb7c19f458f1d28f947849a6a31a7ee34 (diff) | |
Core/DB: Convert 25 more scripts to creature text
Diffstat (limited to 'src/server/scripts/EasternKingdoms/ScarletEnclave')
| -rw-r--r-- | src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp | 61 | ||||
| -rw-r--r-- | src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp | 42 |
2 files changed, 25 insertions, 78 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 0cb2bd7f7bc..4a29a7d929b 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -25,6 +25,7 @@ #include "PassiveAI.h" #include "Player.h" #include "SpellInfo.h" +#include "CreatureTextMgr.h" /*###### ##Quest 12848 @@ -32,7 +33,7 @@ #define GCD_CAST 1 -enum eDeathKnightSpells +enum UnworthyInitiate { SPELL_SOUL_PRISON_CHAIN_SELF = 54612, SPELL_SOUL_PRISON_CHAIN = 54613, @@ -41,25 +42,24 @@ enum eDeathKnightSpells SPELL_ICY_TOUCH = 52372, SPELL_PLAGUE_STRIKE = 52373, SPELL_BLOOD_STRIKE = 52374, - SPELL_DEATH_COIL = 52375 -}; + SPELL_DEATH_COIL = 52375, -#define EVENT_ICY_TOUCH 1 -#define EVENT_PLAGUE_STRIKE 2 -#define EVENT_BLOOD_STRIKE 3 -#define EVENT_DEATH_COIL 4 + SAY_EVENT_START = 0, + SAY_EVENT_ATTACK = 1, -//used by 29519, 29520, 29565, 29566, 29567 but signed for 29519 -int32 say_event_start[8] = -{ - -1609000, -1609001, -1609002, -1609003, - -1609004, -1609005, -1609006, -1609007 + EVENT_ICY_TOUCH = 1, + EVENT_PLAGUE_STRIKE = 2, + EVENT_BLOOD_STRIKE = 3, + EVENT_DEATH_COIL = 4 }; -int32 say_event_attack[9] = +enum UnworthyInitiatePhase { - -1609008, -1609009, -1609010, -1609011, -1609012, - -1609013, -1609014, -1609015, -1609016 + PHASE_CHAINED, + PHASE_TO_EQUIP, + PHASE_EQUIPING, + PHASE_TO_ATTACK, + PHASE_ATTACKING, }; uint32 acherus_soul_prison[12] = @@ -87,15 +87,6 @@ uint32 acherus_unworthy_initiate[5] = 29567 }; -enum UnworthyInitiatePhase -{ - PHASE_CHAINED, - PHASE_TO_EQUIP, - PHASE_EQUIPING, - PHASE_TO_ATTACK, - PHASE_ATTACKING, -}; - class npc_unworthy_initiate : public CreatureScript { public: @@ -155,7 +146,7 @@ public: me->CastSpell(me, SPELL_DK_INITIATE_VISUAL, true); if (Player* starter = Unit::GetPlayer(*me, playerGUID)) - DoScriptText(say_event_attack[rand()%9], me, starter); + sCreatureTextMgr->SendChat(me, SAY_EVENT_ATTACK, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, starter); phase = PHASE_TO_ATTACK; } @@ -174,7 +165,7 @@ public: anchor->GetContactPoint(me, anchorX, anchorY, z, 1.0f); playerGUID = target->GetGUID(); - DoScriptText(say_event_start[rand()%8], me, target); + sCreatureTextMgr->SendChat(me, SAY_EVENT_START, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, target); } void UpdateAI(const uint32 diff) @@ -341,15 +332,7 @@ public: enum eDuelEnums { - SAY_DUEL_A = -1609080, - SAY_DUEL_B = -1609081, - SAY_DUEL_C = -1609082, - SAY_DUEL_D = -1609083, - SAY_DUEL_E = -1609084, - SAY_DUEL_F = -1609085, - SAY_DUEL_G = -1609086, - SAY_DUEL_H = -1609087, - SAY_DUEL_I = -1609088, + SAY_DUEL = 0, SPELL_DUEL = 52996, //SPELL_DUEL_TRIGGERED = 52990, @@ -360,11 +343,6 @@ enum eDuelEnums FACTION_HOSTILE = 2068 }; -int32 m_auiRandomSay[] = -{ - SAY_DUEL_A, SAY_DUEL_B, SAY_DUEL_C, SAY_DUEL_D, SAY_DUEL_E, SAY_DUEL_F, SAY_DUEL_G, SAY_DUEL_H, SAY_DUEL_I -}; - class npc_death_knight_initiate : public CreatureScript { public: @@ -389,8 +367,7 @@ public: creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC); creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15); - int32 uiSayId = rand()% (sizeof(m_auiRandomSay)/sizeof(int32)); - DoScriptText(m_auiRandomSay[uiSayId], creature, player); + sCreatureTextMgr->SendChat(creature, SAY_EVENT_ATTACK, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player); player->CastSpell(creature, SPELL_DUEL, false); player->CastSpell(player, SPELL_DUEL_FLAG, true); diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp index 78fc8d127b2..2b21bb26804 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp @@ -20,6 +20,7 @@ #include "ScriptedEscortAI.h" #include "Player.h" #include "SpellInfo.h" +#include "CreatureTextMgr.h" //How to win friends and influence enemies // texts signed for creature 28939 but used for 28939, 28940, 28610 @@ -30,22 +31,14 @@ enum win_friends SAY_PERSUADED2 = 3, SAY_PERSUADED3 = 4, SAY_PERSUADED4 = 5, - SAY_PERSUADED6 = 6, + SAY_PERSUADED5 = 6, + SAY_PERSUADED6 = 7, + SAY_PERSUADE_RAND = 8, SPELL_PERSUASIVE_STRIKE = 52781, SPELL_THREAT_PULSE = 58111, QUEST_HOW_TO_WIN_FRIENDS = 12720, }; -#define SAY_PERSUADED5 "LIES! The pain you are about to endure will be talked about for years to come!" - -#define SAY_PERSUADE1 "I'll tear the secrets from your soul! Tell me about the \"Crimson Dawn\" and your life may be spared!" -#define SAY_PERSUADE2 "Tell me what you know about \"Crimson Dawn\" or the beatings will continue!" -#define SAY_PERSUADE3 "I'm through being courteous with your kind, human! What is the \"Crimson Dawn\"?" -#define SAY_PERSUADE4 "Is your life worth so little? Just tell me what I need to know about \"Crimson Dawn\" and I'll end your suffering quickly." -#define SAY_PERSUADE5 "I can keep this up for a very long time, Scarlet dog! Tell me about the \"Crimson Dawn\"!" -#define SAY_PERSUADE6 "What is the \"Crimson Dawn\"?" -#define SAY_PERSUADE7 "\"Crimson Dawn\"! What is it! Speak!" - class npc_crusade_persuaded : public CreatureScript { public: @@ -90,30 +83,7 @@ public: me->SetReactState(REACT_PASSIVE); DoCastAOE(SPELL_THREAT_PULSE, true); - switch (urand(1, 7)) - { - case 1: - player->Say(SAY_PERSUADE1, LANG_UNIVERSAL); - break; - case 2: - player->Say(SAY_PERSUADE2, LANG_UNIVERSAL); - break; - case 3: - player->Say(SAY_PERSUADE3, LANG_UNIVERSAL); - break; - case 4: - player->Say(SAY_PERSUADE4, LANG_UNIVERSAL); - break; - case 5: - player->Say(SAY_PERSUADE5, LANG_UNIVERSAL); - break; - case 6: - player->Say(SAY_PERSUADE6, LANG_UNIVERSAL); - break; - case 7: - player->Say(SAY_PERSUADE7, LANG_UNIVERSAL); - break; - } + sCreatureTextMgr->SendChat(me, SAY_PERSUADE_RAND, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player); Talk(SAY_CRUSADER); } } @@ -156,7 +126,7 @@ public: break; case 5: - player->Say(SAY_PERSUADED5, LANG_UNIVERSAL); + sCreatureTextMgr->SendChat(me, SAY_PERSUADED5, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, player); speechTimer = 8000; break; |
