mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Scripting: Move some text to creature text.
This commit is contained in:
15
sql/updates/world/2013_01_07_02_world_creature_text.sql
Normal file
15
sql/updates/world/2013_01_07_02_world_creature_text.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- Texts for Valkyr Battle Maiden
|
||||
DELETE FROM `creature_text` WHERE `entry`= 28534;
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
|
||||
(28534,0,0, 'It is not yet your time, champion. Rise! Rise and fight once more!',15,0,100,0,0,0, 'Valkyr Battle Maiden');
|
||||
|
||||
-- Texts for Dark Rider of Acherus
|
||||
DELETE FROM `creature_text` WHERE `entry`= 28654;
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
|
||||
(28654,0,0, 'The realm of shadows awaits...',12,0,100,0,0,0, 'Dark Rider of Acherus');
|
||||
|
||||
-- Texts for Scarlet Miner
|
||||
DELETE FROM `creature_text` WHERE `entry`= 28841;
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
|
||||
(28841,0,0, 'Where''d this come from? I better get this down to the ships before the foreman sees it!',12,0,100,0,0,0, 'Scarlet Miner'),
|
||||
(28841,1,0, "Now I can have a rest!",12,0,100,0,0,0, 'Scarlet Miner');
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
me->CastSpell(me, SPELL_DK_INITIATE_VISUAL, true);
|
||||
|
||||
if (Player* starter = Unit::GetPlayer(*me, playerGUID))
|
||||
sCreatureTextMgr->SendChat(me, SAY_EVENT_ATTACK, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, starter);
|
||||
Talk(SAY_EVENT_ATTACK);
|
||||
|
||||
phase = PHASE_TO_ATTACK;
|
||||
}
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
anchor->GetContactPoint(me, anchorX, anchorY, z, 1.0f);
|
||||
|
||||
playerGUID = target->GetGUID();
|
||||
sCreatureTextMgr->SendChat(me, SAY_EVENT_START, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, target);
|
||||
Talk(SAY_EVENT_START);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -330,15 +330,21 @@ public:
|
||||
|
||||
#define GOSSIP_ACCEPT_DUEL "I challenge you, death knight!"
|
||||
|
||||
enum eDuelEnums
|
||||
enum Spells_DKI
|
||||
{
|
||||
SAY_DUEL = 0,
|
||||
|
||||
SPELL_DUEL = 52996,
|
||||
//SPELL_DUEL_TRIGGERED = 52990,
|
||||
SPELL_DUEL_VICTORY = 52994,
|
||||
SPELL_DUEL_FLAG = 52991,
|
||||
};
|
||||
|
||||
enum Says_VBM
|
||||
{
|
||||
SAY_DUEL = 0,
|
||||
};
|
||||
|
||||
enum Misc_VBN
|
||||
{
|
||||
QUEST_DEATH_CHALLENGE = 12733,
|
||||
FACTION_HOSTILE = 2068
|
||||
};
|
||||
@@ -501,8 +507,15 @@ public:
|
||||
## npc_dark_rider_of_acherus
|
||||
######*/
|
||||
|
||||
#define DESPAWN_HORSE 52267
|
||||
#define SAY_DARK_RIDER "The realm of shadows awaits..."
|
||||
enum Spells_DR
|
||||
{
|
||||
SPELL_DESPAWN_HORSE = 51918
|
||||
};
|
||||
|
||||
enum Says_DR
|
||||
{
|
||||
SAY_DARK_RIDER = 0
|
||||
};
|
||||
|
||||
class npc_dark_rider_of_acherus : public CreatureScript
|
||||
{
|
||||
@@ -547,7 +560,7 @@ public:
|
||||
break;
|
||||
case 1:
|
||||
if (Unit* target = Unit::GetUnit(*me, TargetGUID))
|
||||
DoCast(target, DESPAWN_HORSE, true);
|
||||
DoCast(target, SPELL_DESPAWN_HORSE, true);
|
||||
PhaseTimer = 3000;
|
||||
Phase = 2;
|
||||
break;
|
||||
@@ -587,13 +600,13 @@ public:
|
||||
## npc_salanar_the_horseman
|
||||
######*/
|
||||
|
||||
enum eSalanar
|
||||
enum Spells_Salanar
|
||||
{
|
||||
REALM_OF_SHADOWS = 52693,
|
||||
EFFECT_STOLEN_HORSE = 52263,
|
||||
DELIVER_STOLEN_HORSE = 52264,
|
||||
CALL_DARK_RIDER = 52266,
|
||||
SPELL_EFFECT_OVERTAKE = 52349
|
||||
SPELL_REALM_OF_SHADOWS = 52693,
|
||||
SPELL_EFFECT_STOLEN_HORSE = 52263,
|
||||
SPELL_DELIVER_STOLEN_HORSE = 52264,
|
||||
SPELL_CALL_DARK_RIDER = 52266,
|
||||
SPELL_EFFECT_OVERTAKE = 52349
|
||||
};
|
||||
|
||||
class npc_salanar_the_horseman : public CreatureScript
|
||||
@@ -612,18 +625,18 @@ public:
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spell)
|
||||
{
|
||||
if (spell->Id == DELIVER_STOLEN_HORSE)
|
||||
if (spell->Id == SPELL_DELIVER_STOLEN_HORSE)
|
||||
{
|
||||
if (caster->GetTypeId() == TYPEID_UNIT && caster->IsVehicle())
|
||||
{
|
||||
if (Unit* charmer = caster->GetCharmer())
|
||||
{
|
||||
if (charmer->HasAura(EFFECT_STOLEN_HORSE))
|
||||
if (charmer->HasAura(SPELL_EFFECT_STOLEN_HORSE))
|
||||
{
|
||||
charmer->RemoveAurasDueToSpell(EFFECT_STOLEN_HORSE);
|
||||
charmer->RemoveAurasDueToSpell(SPELL_EFFECT_STOLEN_HORSE);
|
||||
caster->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
|
||||
caster->setFaction(35);
|
||||
DoCast(caster, CALL_DARK_RIDER, true);
|
||||
DoCast(caster, SPELL_CALL_DARK_RIDER, true);
|
||||
if (Creature* Dark_Rider = me->FindNearestCreature(28654, 15))
|
||||
CAST_AI(npc_dark_rider_of_acherus::npc_dark_rider_of_acherusAI, Dark_Rider->AI())->InitDespawnHorse(caster);
|
||||
}
|
||||
@@ -651,8 +664,8 @@ public:
|
||||
//CAST_CRE(who)->Respawn(true);
|
||||
}
|
||||
|
||||
if (CAST_PLR(charmer)->HasAura(REALM_OF_SHADOWS))
|
||||
charmer->RemoveAurasDueToSpell(REALM_OF_SHADOWS);
|
||||
if (CAST_PLR(charmer)->HasAura(SPELL_REALM_OF_SHADOWS))
|
||||
charmer->RemoveAurasDueToSpell(SPELL_REALM_OF_SHADOWS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -715,10 +728,10 @@ public:
|
||||
};
|
||||
|
||||
// correct way: 52312 52314 52555 ...
|
||||
enum SG
|
||||
enum Creatures_SG
|
||||
{
|
||||
GHOULS = 28845,
|
||||
GHOSTS = 28846,
|
||||
NPC_GHOULS = 28845,
|
||||
NPC_GHOSTS = 28846,
|
||||
};
|
||||
class npc_dkc1_gothik : public CreatureScript
|
||||
{
|
||||
@@ -738,7 +751,7 @@ public:
|
||||
{
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
|
||||
if (who->GetEntry() == GHOULS && me->IsWithinDistInMap(who, 10.0f))
|
||||
if (who->GetEntry() == NPC_GHOULS && me->IsWithinDistInMap(who, 10.0f))
|
||||
{
|
||||
if (Unit* owner = who->GetOwner())
|
||||
{
|
||||
@@ -753,7 +766,7 @@ public:
|
||||
CAST_CRE(who)->DespawnOrUnsummon();
|
||||
|
||||
if (CAST_PLR(owner)->GetQuestStatus(12698) == QUEST_STATUS_COMPLETE)
|
||||
owner->RemoveAllMinionsByEntry(GHOULS);
|
||||
owner->RemoveAllMinionsByEntry(NPC_GHOSTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -786,7 +799,7 @@ public:
|
||||
void FindMinions(Unit* owner)
|
||||
{
|
||||
std::list<Creature*> MinionList;
|
||||
owner->GetAllMinionsByEntry(MinionList, GHOULS);
|
||||
owner->GetAllMinionsByEntry(MinionList, NPC_GHOULS);
|
||||
|
||||
if (!MinionList.empty())
|
||||
{
|
||||
@@ -812,7 +825,7 @@ public:
|
||||
Player* plrOwner = owner->ToPlayer();
|
||||
if (plrOwner && plrOwner->isInCombat())
|
||||
{
|
||||
if (plrOwner->getAttackerForHelper() && plrOwner->getAttackerForHelper()->GetEntry() == GHOSTS)
|
||||
if (plrOwner->getAttackerForHelper() && plrOwner->getAttackerForHelper()->GetEntry() == NPC_GHOSTS)
|
||||
AttackStart(plrOwner->getAttackerForHelper());
|
||||
else
|
||||
FindMinions(owner);
|
||||
@@ -825,7 +838,7 @@ public:
|
||||
|
||||
//ScriptedAI::UpdateAI(diff);
|
||||
//Check if we have a current target
|
||||
if (me->getVictim()->GetEntry() == GHOSTS)
|
||||
if (me->getVictim()->GetEntry() == NPC_GHOSTS)
|
||||
{
|
||||
if (me->isAttackReady())
|
||||
{
|
||||
@@ -846,8 +859,11 @@ public:
|
||||
## npc_scarlet_miner_cart
|
||||
####*/
|
||||
|
||||
#define SPELL_CART_CHECK 54173
|
||||
#define SPELL_CART_DRAG 52465
|
||||
enum Spells_SM
|
||||
{
|
||||
SPELL_CART_CHECK = 54173,
|
||||
SPELL_CART_DRAG = 52465
|
||||
};
|
||||
|
||||
class npc_scarlet_miner_cart : public CreatureScript
|
||||
{
|
||||
@@ -902,8 +918,11 @@ public:
|
||||
## npc_scarlet_miner
|
||||
####*/
|
||||
|
||||
#define SAY_SCARLET_MINER1 "Where'd this come from? I better get this down to the ships before the foreman sees it!"
|
||||
#define SAY_SCARLET_MINER2 "Now I can have a rest!"
|
||||
enum Says_SM
|
||||
{
|
||||
SAY_SCARLET_MINER_0 = 0,
|
||||
SAY_SCARLET_MINER_1 = 1
|
||||
};
|
||||
|
||||
class npc_scarlet_miner : public CreatureScript
|
||||
{
|
||||
@@ -984,7 +1003,7 @@ public:
|
||||
me->SetInFront(car);
|
||||
me->SendMovementFlagUpdate();
|
||||
}
|
||||
me->MonsterSay(SAY_SCARLET_MINER1, LANG_UNIVERSAL, 0);
|
||||
Talk(SAY_SCARLET_MINER_0);
|
||||
SetRun(true);
|
||||
IntroTimer = 4000;
|
||||
IntroPhase = 1;
|
||||
@@ -998,7 +1017,7 @@ public:
|
||||
car->StopMoving();
|
||||
car->RemoveAura(SPELL_CART_DRAG);
|
||||
}
|
||||
me->MonsterSay(SAY_SCARLET_MINER2, LANG_UNIVERSAL, 0);
|
||||
Talk(SAY_SCARLET_MINER_1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -1036,7 +1055,10 @@ public:
|
||||
## go_inconspicuous_mine_car
|
||||
######*/
|
||||
|
||||
#define SPELL_CART_SUMM 52463
|
||||
enum Spells_Cart
|
||||
{
|
||||
SPELL_CART_SUMM = 52463
|
||||
};
|
||||
|
||||
class go_inconspicuous_mine_car : public GameObjectScript
|
||||
{
|
||||
|
||||
@@ -23,8 +23,16 @@
|
||||
/*####
|
||||
## npc_valkyr_battle_maiden
|
||||
####*/
|
||||
#define SPELL_REVIVE 51918
|
||||
#define VALK_WHISPER "It is not yet your time, champion. Rise! Rise and fight once more!"
|
||||
|
||||
enum Spells_VBM
|
||||
{
|
||||
SPELL_REVIVE = 51918
|
||||
};
|
||||
|
||||
enum Says_VBM
|
||||
{
|
||||
WHISPER_REVIVE = 0
|
||||
};
|
||||
|
||||
class npc_valkyr_battle_maiden : public CreatureScript
|
||||
{
|
||||
@@ -96,7 +104,7 @@ public:
|
||||
{
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOM_SPELL_01);
|
||||
DoCast(player, SPELL_REVIVE, true);
|
||||
me->MonsterWhisper(VALK_WHISPER, player->GetGUID());
|
||||
Talk(WHISPER_REVIVE,player->GetGUID());
|
||||
}
|
||||
FlyBackTimer = 5000;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user