mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-31 06:07:37 +01:00
Misc:
- Fix missing newlines - Fix some startup errors
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
UPDATE `creature_template` SET `ScriptName` = REPLACE(`ScriptName`, 'mob_', 'npc_') WHERE `ScriptName` LIKE 'mob\_%';
|
||||
UPDATE `creature_template` SET `ScriptName` = REPLACE(`ScriptName`, 'mobs_', 'npc_') WHERE `ScriptName` LIKE 'mobs\_%';
|
||||
UPDATE `spell_script_names` SET `ScriptName`='spell_trash_npc_glacial_strike' WHERE `ScriptName`='spell_trash_mob_glacial_strike';
|
||||
|
||||
|
||||
@@ -201,4 +201,4 @@ update `creature_template` set exp=2 where `entry` in (37234,
|
||||
37399, 37401, 37402, 37403, 37404, 37407, 37409, 37410, 37412, 37415,
|
||||
37416, 37419, 37420, 37422, 37426, 37427, 37431, 37435, 37442, 37444,
|
||||
37450, 37451, 37468, 37469, 37470, 37473, 37475, 37479, 37480, 37481,
|
||||
37483, 37484, 37485, 37486);
|
||||
37483, 37484, 37485, 37486);
|
||||
|
||||
27
sql/updates/world/2013_07_05_02_world_misc.sql
Normal file
27
sql/updates/world/2013_07_05_02_world_misc.sql
Normal file
@@ -0,0 +1,27 @@
|
||||
-- Into the Pit (thx to KirkHammett)
|
||||
SET @ENTRY := 30174;
|
||||
SET @SPELL_SMASH := 54458;
|
||||
SET @SPELL_DSHOUT := 54459;
|
||||
SET @SPELL_CHARGE := 54460;
|
||||
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI', `faction_A`=2128, `faction_H`=2128 WHERE `entry`=@ENTRY;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` =@ENTRY;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(@ENTRY,0,0,0,1,0,100,0,0,0,0,0,2,31,0,0,0,0,0,1,0,0,0,0,0,0,0,'Hyldsmeet Warbear - OOC - Set Faction'),
|
||||
(@ENTRY,0,1,0,0,0,100,0,3000,6000,7000,12000,11,@SPELL_SMASH,1,0,0,0,0,2,0,0,0,0,0,0,0,'Hyldsmeet Warbear - In Combat - Cast Smash'),
|
||||
(@ENTRY,0,2,0,0,0,100,0,1000,35000,70000,95000,11,@SPELL_DSHOUT,1,0,0,0,0,2,0,0,0,0,0,0,0,'Hyldsmeet Warbear - In Combat - Cast Demoralizing Shout'),
|
||||
(@ENTRY,0,3,0,0,0,100,0,5000,9000,11000,17000,11,@SPELL_CHARGE,1,0,0,0,0,2,0,0,0,0,0,0,0,'Hyldsmeet Warbear - In Combat - Cast Charge');
|
||||
|
||||
-- Some errors startup errors
|
||||
UPDATE `creature_equip_template` SET `itemEntry1`=12883 WHERE `entry`=29927 AND `id`=1;
|
||||
|
||||
UPDATE `creature_template` SET `npcflag`=3 WHERE `entry`=37416;
|
||||
UPDATE `creature_template` SET `npcflag`=2 WHERE `entry`=37346;
|
||||
UPDATE `creature_template` SET `npcflag`=2 WHERE `entry`=37364;
|
||||
UPDATE `creature_template` SET `npcflag`=2 WHERE `entry`=37269;
|
||||
UPDATE `creature_template` SET `npcflag`=2 WHERE `entry`=37369;
|
||||
UPDATE `creature_template` SET `npcflag`=2 WHERE `entry`=37268;
|
||||
UPDATE `creature_template` SET `npcflag`=2 WHERE `entry`=37335;
|
||||
UPDATE `creature_template` SET `npcflag`=2 WHERE `entry`=37483;
|
||||
UPDATE `creature_template` SET `npcflag`=4194306 WHERE `entry`=37310;
|
||||
UPDATE `creature_template` SET `npcflag`=4194306 WHERE `entry`=37426;
|
||||
@@ -254,182 +254,6 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_second_trial_controller
|
||||
######*/
|
||||
|
||||
class npc_second_trial_controller : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_second_trial_controller() : CreatureScript("npc_second_trial_controller") { }
|
||||
|
||||
bool OnQuestAccept(Player* /*player*/, Creature* creature, Quest const* quest)
|
||||
{
|
||||
// One Player exclusive quest, wait for user go activation
|
||||
if (quest->GetQuestId() == QUEST_SECOND_TRIAL)
|
||||
CAST_AI(npc_second_trial_controller::master_kelerun_bloodmournAI, creature->AI())->questPhase = 1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
// quest only available if not already started
|
||||
// Quest_template flag is set to : QUEST_FLAGS_EVENT
|
||||
// Escort quests or any other event-driven quests. If player in party, all players that can accept this quest will receive confirmation box to accept quest.
|
||||
// !not sure if this really works!
|
||||
|
||||
if (CAST_AI(npc_second_trial_controller::master_kelerun_bloodmournAI, creature->AI())->questPhase == 0)
|
||||
{
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
player->SendPreparedQuest(creature->GetGUID());
|
||||
}
|
||||
|
||||
player->SEND_GOSSIP_MENU(creature->GetEntry(), creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new master_kelerun_bloodmournAI (creature);
|
||||
}
|
||||
|
||||
struct master_kelerun_bloodmournAI : public ScriptedAI
|
||||
{
|
||||
master_kelerun_bloodmournAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
uint8 questPhase;
|
||||
uint8 paladinPhase;
|
||||
uint32 timer;
|
||||
|
||||
uint64 paladinGuid[4];
|
||||
|
||||
void Reset()
|
||||
{
|
||||
questPhase = 0;
|
||||
timer = 60000;
|
||||
paladinPhase = 0;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
paladinGuid[i] = 0;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) {}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
// Quest accepted but object not activated, object despawned (if in sync 1 minute!)
|
||||
if (questPhase == 1)
|
||||
{
|
||||
if (timer <= diff)
|
||||
Reset();
|
||||
else
|
||||
timer -= diff;
|
||||
}
|
||||
// fight the 4 paladin mobs phase
|
||||
else if (questPhase == 2)
|
||||
{
|
||||
if (timer <= diff)
|
||||
{
|
||||
if (Creature* paladinSpawn = Unit::GetCreature((*me), paladinGuid[paladinPhase]))
|
||||
{
|
||||
CAST_AI(npc_second_trial_paladin::npc_secondTrialAI, paladinSpawn->AI())->Activate(me->GetGUID());
|
||||
|
||||
switch (paladinPhase)
|
||||
{
|
||||
case 0:
|
||||
Talk(TEXT_SECOND_TRIAL_1);
|
||||
break;
|
||||
case 1:
|
||||
Talk(TEXT_SECOND_TRIAL_2);
|
||||
break;
|
||||
case 2:
|
||||
Talk(TEXT_SECOND_TRIAL_3);
|
||||
break;
|
||||
case 3:
|
||||
Talk(TEXT_SECOND_TRIAL_4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
Reset();
|
||||
|
||||
questPhase = 4;
|
||||
timer = OFFSET_NEXT_ATTACK;
|
||||
}
|
||||
else
|
||||
timer -= diff;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void StartEvent()
|
||||
{
|
||||
if (questPhase == 1)
|
||||
{ // no player check, quest can be finished as group, so no complex PlayerGUID/group search code
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (Creature* summoned = DoSpawnCreature(PaladinEntry[i], SpawnPosition[i].x, SpawnPosition[i].y, SpawnPosition[i].z, SpawnPosition[i].o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 180000))
|
||||
paladinGuid[i] = summoned->GetGUID();
|
||||
|
||||
timer = OFFSET_NEXT_ATTACK;
|
||||
questPhase = 2;
|
||||
}
|
||||
}
|
||||
|
||||
void SecondTrialKill()
|
||||
{
|
||||
if (questPhase > 0)
|
||||
{
|
||||
++paladinPhase;
|
||||
|
||||
if (paladinPhase < 4)
|
||||
questPhase = 2;
|
||||
else
|
||||
Reset(); // Quest Complete, QuestComplete handler is
|
||||
}
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* /*c*/) {}
|
||||
};
|
||||
};
|
||||
|
||||
void npc_second_trial_paladin::npc_secondTrialAI::JustDied(Unit* Killer)
|
||||
{
|
||||
if (Killer->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (Creature* summoner = Unit::GetCreature((*me), summonerGuid))
|
||||
CAST_AI(npc_second_trial_controller::master_kelerun_bloodmournAI, summoner->AI())->SecondTrialKill();
|
||||
|
||||
// last kill quest complete for group
|
||||
if (me->GetEntry() == CHAMPION_SUNSTRIKER)
|
||||
{
|
||||
if (Killer->GetTypeId() == TYPEID_PLAYER)
|
||||
Killer->ToPlayer()->GroupEventHappens(QUEST_SECOND_TRIAL, Killer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*######
|
||||
## go_second_trial
|
||||
######*/
|
||||
class go_second_trial : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_second_trial() : GameObjectScript("go_second_trial") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go)
|
||||
{
|
||||
// find spawn :: master_kelerun_bloodmourn
|
||||
if (Creature* creature = go->FindNearestCreature(MASTER_KELERUN_BLOODMOURN, 30.0f))
|
||||
CAST_AI(npc_second_trial_controller::master_kelerun_bloodmournAI, creature->AI())->StartEvent();
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_apprentice_mirveda
|
||||
######*/
|
||||
@@ -629,9 +453,6 @@ public:
|
||||
|
||||
void AddSC_eversong_woods()
|
||||
{
|
||||
new npc_second_trial_controller();
|
||||
new npc_second_trial_paladin();
|
||||
new go_second_trial();
|
||||
new npc_apprentice_mirveda();
|
||||
new npc_infused_crystal();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user