mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
DB/Scripts: Terokkar Forest SAI migration
(cherry picked from commit 4d338b1d4d)
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
--
|
||||
UPDATE `creature_template` SET `ScriptName` = '', `AIName` = 'SmartAI' WHERE `entry` IN (22095, 22307, 18588);
|
||||
UPDATE `creature_template` SET `ScriptName` = '' WHERE `entry` = 19679;
|
||||
UPDATE `gameobject_template` SET `ScriptName` = '', `AIName` = 'SmartGameObjectAI' WHERE `entry` = 185913;
|
||||
|
||||
DELETE FROM `gossip_menu` WHERE `MenuID` = 8021;
|
||||
INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES
|
||||
(8021, 9895, 0),
|
||||
(8021, 9896, 0);
|
||||
|
||||
-- UPDATE `gossip_menu_option` SET `ActionMenuID` = 7731 WHERE `MenuID` = 7732 AND `OptionID` = 0;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` IN (22095, 22307, 18588)) OR (`source_type` = 1 AND `entryorguid` = 185913);
|
||||
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
|
||||
(22095, 0, 0, 0, 6, 0, 75, 0, 0, 0, 0, 0, 11, 39130, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Infested Root-Walker - On Just Died - Cast \'Summon Wood Mites\''),
|
||||
(22095, 0, 1, 0, 0, 0, 100, 0, 15000, 20000, 32000, 38000, 11, 39000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Infested Root-Walker - In Combat - Cast \'Regrowth\' (No Repeat)'),
|
||||
(22307, 0, 0, 0, 6, 0, 75, 0, 0, 0, 0, 0, 11, 39134, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rotting Forest-Rager - On Just Died - Cast \'Summon Lots Of Wood Mites\''),
|
||||
(22307, 0, 1, 0, 0, 0, 100, 0, 0, 5, 12000, 18000, 11, 15548, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rotting Forest-Rager - In Combat - Cast \'Thunderclap\' (No Repeat)'),
|
||||
(18588, 0, 0, 0, 0, 0, 100, 0, 2000, 2000, 30000, 30000, 11, 6726, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Floon - In Combat - Cast \'Silence\''),
|
||||
(18588, 0, 1, 0, 0, 0, 100, 0, 4000, 4000, 5000, 5000, 11, 9672, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Floon - In Combat - Cast \'Frostbolt\''),
|
||||
(18588, 0, 2, 0, 0, 0, 100, 0, 9000, 9000, 20000, 20000, 11, 11831, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Floon - In Combat - Cast \'Frost Nova\''),
|
||||
(18588, 0, 3, 4, 62, 0, 100, 0, 7731, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Floon - On Gossip Option 0 Selected - Close Gossip'),
|
||||
(18588, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 2, 1738, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Floon - On Gossip Option 0 Selected - Set Faction Arrakoa'),
|
||||
(18588, 0, 5, 6, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Floon - On Gossip Option 0 Selected - Say Line 0'),
|
||||
(18588, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Floon - On Gossip Option 0 Selected - Start Attacking'),
|
||||
(18588, 0, 7, 0, 25, 0, 100, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Floon - On Reset - Set Default Faction'),
|
||||
(185913, 1, 0, 4, 62, 0, 100, 0, 8660, 0, 0, 0, 85, 40632, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Skull Pile - On Gossip Option 0 Selected - Invoker Cast \'Summon Gezzarak the Huntress\''),
|
||||
(185913, 1, 1, 4, 62, 0, 100, 0, 8660, 1, 0, 0, 85, 40642, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Skull Pile - On Gossip Option 1 Selected - Invoker Cast \'Summon Darkscreecher Akkarai\''),
|
||||
(185913, 1, 2, 4, 62, 0, 100, 0, 8660, 2, 0, 0, 85, 40640, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Skull Pile - On Gossip Option 2 Selected - Invoker Cast \'Summon Karrog\''),
|
||||
(185913, 1, 3, 4, 62, 0, 100, 0, 8660, 3, 0, 0, 85, 40644, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Skull Pile - On Gossip Option 3 Selected - Invoker Cast \'Summon Vakkiz the Windrager\''),
|
||||
(185913, 1, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Skull Pile - On Gossip Option Selected - Close Gossip');
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` IN (7732, 8660);
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14, 15) AND `SourceGroup` = 8021;
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceGroup` = 1 AND `SourceEntry` IN (22095, 22307) AND `SourceId` = 0;
|
||||
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(15, 8660, 0, 0, 0, 9, 0, 11885, 0, 0, 0, 0, 0, '', 'Show gossip menu 8660 option id 0 if quest Adversarial Blood has been taken.'),
|
||||
(15, 8660, 1, 0, 0, 9, 0, 11885, 0, 0, 0, 0, 0, '', 'Show gossip menu 8660 option id 1 if quest Adversarial Blood has been taken.'),
|
||||
(15, 8660, 2, 0, 0, 9, 0, 11885, 0, 0, 0, 0, 0, '', 'Show gossip menu 8660 option id 2 if quest Adversarial Blood has been taken.'),
|
||||
(15, 8660, 3, 0, 0, 9, 0, 11885, 0, 0, 0, 0, 0, '', 'Show gossip menu 8660 option id 3 if quest Adversarial Blood has been taken.'),
|
||||
(15, 8660, 0, 0, 1, 8, 0, 11885, 0, 0, 0, 0, 0, '', 'Show gossip menu 8660 option id 0 if quest Adversarial Blood has been rewarded.'),
|
||||
(15, 8660, 1, 0, 1, 8, 0, 11885, 0, 0, 0, 0, 0, '', 'Show gossip menu 8660 option id 1 if quest Adversarial Blood has been rewarded.'),
|
||||
(15, 8660, 2, 0, 1, 8, 0, 11885, 0, 0, 0, 0, 0, '', 'Show gossip menu 8660 option id 2 if quest Adversarial Blood has been rewarded.'),
|
||||
(15, 8660, 3, 0, 1, 8, 0, 11885, 0, 0, 0, 0, 0, '', 'Show gossip menu 8660 option id 3 if quest Adversarial Blood has been rewarded.'),
|
||||
(14, 8021, 9896, 0, 0, 5, 0, 933, 240, 0, 0, 0, 0, '', 'Show gossip menu 8021 text id 9896 if player is at least Friendly with The Consortium.'),
|
||||
(14, 8021, 9895, 0, 0, 5, 0, 933, 240, 0, 1, 0, 0, '', 'Show gossip menu 8021 text id 9895 if player is not at least Friendly with The Consortium.'),
|
||||
(15, 8021, 0, 0, 0, 5, 0, 933, 240, 0, 0, 0, 0, '', 'Show gossip menu 8021 option id 0 if player is at least Friendly with The Consortium.'),
|
||||
(15, 7732, 0, 0, 0, 9, 0, 10009, 0, 0, 0, 0, 0, '', 'Show gossip menu 7732 option id 0 if quest Crackin\' Some Skulls has been taken.'),
|
||||
(22, 1, 22095, 0, 0, 32, 0, 16, 0, 0, 0, 0, 0, '', ' Id 0 of Creature SAI for Infested Root-Walker will execute if invoker is player.'),
|
||||
(22, 1, 22307, 0, 0, 32, 0, 16, 0, 0, 0, 0, 0, '', ' Id 0 of Creature SAI for Rotting Forest-Rager will execute if invoker is player.');
|
||||
@@ -18,26 +18,22 @@
|
||||
/* ScriptData
|
||||
SDName: Terokkar_Forest
|
||||
SD%Complete: 85
|
||||
SDComment: Quest support: 9889, 10009, 10873, 10896, 10898, 11096, 10052, 10051. Skettis->Ogri'la Flight
|
||||
SDComment: Quest support: 9889, 10898, 10052, 10051.
|
||||
SDCategory: Terokkar Forest
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_unkor_the_ruthless
|
||||
npc_infested_root_walker
|
||||
npc_rotting_forest_rager
|
||||
npc_floon
|
||||
npc_isla_starmane
|
||||
npc_slim
|
||||
npc_skywing
|
||||
npc_akuno
|
||||
EndContentData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameObjectAI.h"
|
||||
#include "Group.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
/*######
|
||||
@@ -164,43 +160,6 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_infested_root_walker
|
||||
######*/
|
||||
|
||||
enum InfestedRootWalker
|
||||
{
|
||||
SPELL_SUMMON_WOOD_MITES = 39130
|
||||
};
|
||||
|
||||
class npc_infested_root_walker : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_infested_root_walker() : CreatureScript("npc_infested_root_walker") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_infested_root_walkerAI(creature);
|
||||
}
|
||||
|
||||
struct npc_infested_root_walkerAI : public ScriptedAI
|
||||
{
|
||||
npc_infested_root_walkerAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() override { }
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
|
||||
void DamageTaken(Unit* done_by, uint32 &damage) override
|
||||
{
|
||||
if (done_by && done_by->GetTypeId() == TYPEID_PLAYER)
|
||||
if (me->GetHealth() <= damage)
|
||||
if (rand32() % 100 < 75)
|
||||
//Summon Wood Mites
|
||||
DoCast(me, SPELL_SUMMON_WOOD_MITES, true);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_skywing
|
||||
######*/
|
||||
@@ -262,159 +221,6 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_rotting_forest_rager
|
||||
######*/
|
||||
|
||||
enum RottingForestRager
|
||||
{
|
||||
SPELL_SUMMON_LOTS_OF_WOOD_MITES = 39134
|
||||
};
|
||||
|
||||
class npc_rotting_forest_rager : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_rotting_forest_rager() : CreatureScript("npc_rotting_forest_rager") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_rotting_forest_ragerAI(creature);
|
||||
}
|
||||
|
||||
struct npc_rotting_forest_ragerAI : public ScriptedAI
|
||||
{
|
||||
npc_rotting_forest_ragerAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() override { }
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
|
||||
void DamageTaken(Unit* done_by, uint32 &damage) override
|
||||
{
|
||||
if (done_by->GetTypeId() == TYPEID_PLAYER)
|
||||
if (me->GetHealth() <= damage)
|
||||
if (rand32() % 100 < 75)
|
||||
//Summon Lots of Wood Mites
|
||||
DoCast(me, SPELL_SUMMON_LOTS_OF_WOOD_MITES, true);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_floon
|
||||
######*/
|
||||
|
||||
enum Floon
|
||||
{
|
||||
SAY_FLOON_ATTACK = 0,
|
||||
OPTION_ID_PAY_UP_OR_DIE = 0,
|
||||
OPTION_ID_COLLECT_A_DEBT = 0,
|
||||
MENU_ID_PAY_UP_OR_DIE = 7731,
|
||||
MENU_ID_COLLECT_A_DEBT = 7732,
|
||||
GOSSIP_FLOON_STRANGE_SOUNDS = 9442,
|
||||
GOSSIP_HE_ALREADY_KILLED_ME = 9443,
|
||||
|
||||
SPELL_SILENCE = 6726,
|
||||
SPELL_FROSTBOLT = 9672,
|
||||
SPELL_FROST_NOVA = 11831,
|
||||
|
||||
QUEST_CRACKIN_SOME_SKULLS = 10009
|
||||
};
|
||||
|
||||
class npc_floon : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_floon() : CreatureScript("npc_floon") { }
|
||||
|
||||
struct npc_floonAI : public ScriptedAI
|
||||
{
|
||||
npc_floonAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
m_uiNormFaction = creature->GetFaction();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Silence_Timer = 2000;
|
||||
Frostbolt_Timer = 4000;
|
||||
FrostNova_Timer = 9000;
|
||||
}
|
||||
|
||||
uint32 m_uiNormFaction;
|
||||
uint32 Silence_Timer;
|
||||
uint32 Frostbolt_Timer;
|
||||
uint32 FrostNova_Timer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
if (me->GetFaction() != m_uiNormFaction)
|
||||
me->SetFaction(m_uiNormFaction);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (Silence_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_SILENCE);
|
||||
Silence_Timer = 30000;
|
||||
} else Silence_Timer -= diff;
|
||||
|
||||
if (FrostNova_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_FROST_NOVA);
|
||||
FrostNova_Timer = 20000;
|
||||
} else FrostNova_Timer -= diff;
|
||||
|
||||
if (Frostbolt_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_FROSTBOLT);
|
||||
Frostbolt_Timer = 5000;
|
||||
} else Frostbolt_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
|
||||
{
|
||||
uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
|
||||
ClearGossipMenuFor(player);
|
||||
if (action == GOSSIP_ACTION_INFO_DEF)
|
||||
{
|
||||
AddGossipItemFor(player, MENU_ID_PAY_UP_OR_DIE, OPTION_ID_PAY_UP_OR_DIE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
SendGossipMenuFor(player, GOSSIP_HE_ALREADY_KILLED_ME, me->GetGUID());
|
||||
}
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
{
|
||||
CloseGossipMenuFor(player);
|
||||
me->SetFaction(FACTION_ARAKKOA);
|
||||
Talk(SAY_FLOON_ATTACK, player);
|
||||
AttackStart(player);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_CRACKIN_SOME_SKULLS) == QUEST_STATUS_INCOMPLETE)
|
||||
AddGossipItemFor(player, MENU_ID_COLLECT_A_DEBT, OPTION_ID_COLLECT_A_DEBT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
|
||||
SendGossipMenuFor(player, GOSSIP_FLOON_STRANGE_SOUNDS, me->GetGUID());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_floonAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_isla_starmane
|
||||
######*/
|
||||
@@ -511,135 +317,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## go_skull_pile
|
||||
######*/
|
||||
|
||||
enum SkullPile
|
||||
{
|
||||
OPTION_ID_GEZZARAK_THE_HUNTRESS = 0,
|
||||
OPTION_ID_DARKSCREECHER_AKKARAI = 1,
|
||||
OPTION_ID_KARROG = 2,
|
||||
OPTION_ID_VAKKIZ_THE_WINDRAGER = 3,
|
||||
GOSSIP_MENU_ID_SKULL_PILE = 8660,
|
||||
ADVERSARIAL_BLOOD = 11885,
|
||||
SUMMON_GEZZARAK_THE_HUNTRESS = 40632,
|
||||
SUMMON_KARROG = 40640,
|
||||
SUMMON_DARKSCREECHER_AKKARAI = 40642,
|
||||
SUMMON_VAKKIZ_THE_WINDRAGER = 40644
|
||||
};
|
||||
|
||||
class go_skull_pile : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_skull_pile() : GameObjectScript("go_skull_pile") { }
|
||||
|
||||
struct go_skull_pileAI : public GameObjectAI
|
||||
{
|
||||
go_skull_pileAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
|
||||
{
|
||||
uint32 const sender = player->PlayerTalkClass->GetGossipOptionSender(gossipListId);
|
||||
uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
|
||||
ClearGossipMenuFor(player);
|
||||
switch (sender)
|
||||
{
|
||||
case GOSSIP_SENDER_MAIN: SendActionMenu(player, action); break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if ((player->GetQuestStatus(ADVERSARIAL_BLOOD) == QUEST_STATUS_INCOMPLETE) || player->GetQuestRewardStatus(ADVERSARIAL_BLOOD))
|
||||
{
|
||||
AddGossipItemFor(player, GOSSIP_MENU_ID_SKULL_PILE, OPTION_ID_GEZZARAK_THE_HUNTRESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
AddGossipItemFor(player, GOSSIP_MENU_ID_SKULL_PILE, OPTION_ID_DARKSCREECHER_AKKARAI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
AddGossipItemFor(player, GOSSIP_MENU_ID_SKULL_PILE, OPTION_ID_KARROG, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
AddGossipItemFor(player, GOSSIP_MENU_ID_SKULL_PILE, OPTION_ID_VAKKIZ_THE_WINDRAGER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
|
||||
}
|
||||
|
||||
SendGossipMenuFor(player, me->GetGOInfo()->questgiver.gossipID, me->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
void SendActionMenu(Player* player, uint32 action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
player->CastSpell(player, SUMMON_GEZZARAK_THE_HUNTRESS, false);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
player->CastSpell(player, SUMMON_DARKSCREECHER_AKKARAI, false);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 3:
|
||||
player->CastSpell(player, SUMMON_KARROG, false);
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF + 4:
|
||||
player->CastSpell(player, SUMMON_VAKKIZ_THE_WINDRAGER, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
GameObjectAI* GetAI(GameObject* go) const override
|
||||
{
|
||||
return new go_skull_pileAI(go);
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_slim
|
||||
######*/
|
||||
|
||||
enum Slim
|
||||
{
|
||||
FACTION_CONSORTIUM = 933,
|
||||
NPC_TEXT_NEITHER_SLIM_NOR_SHADY = 9895,
|
||||
NPC_TEXT_I_SEE_YOU_ARE_A_FRIEND = 9896
|
||||
};
|
||||
|
||||
class npc_slim : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_slim() : CreatureScript("npc_slim") { }
|
||||
|
||||
struct npc_slimAI : public ScriptedAI
|
||||
{
|
||||
npc_slimAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
|
||||
{
|
||||
uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
|
||||
ClearGossipMenuFor(player);
|
||||
if (action == GOSSIP_ACTION_TRADE)
|
||||
player->GetSession()->SendListInventory(me->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (me->IsVendor() && player->GetReputationRank(FACTION_CONSORTIUM) >= REP_FRIENDLY)
|
||||
{
|
||||
AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
|
||||
SendGossipMenuFor(player, NPC_TEXT_I_SEE_YOU_ARE_A_FRIEND, me->GetGUID());
|
||||
}
|
||||
else
|
||||
SendGossipMenuFor(player, NPC_TEXT_NEITHER_SLIM_NOR_SHADY, me->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_slimAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/*########
|
||||
####npc_akuno
|
||||
#####*/
|
||||
@@ -706,12 +383,7 @@ public:
|
||||
void AddSC_terokkar_forest()
|
||||
{
|
||||
new npc_unkor_the_ruthless();
|
||||
new npc_infested_root_walker();
|
||||
new npc_rotting_forest_rager();
|
||||
new npc_floon();
|
||||
new npc_isla_starmane();
|
||||
new go_skull_pile();
|
||||
new npc_skywing();
|
||||
new npc_slim();
|
||||
new npc_akuno();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user