fix(DB/SAI): Move Floon,Raliq the Drunk and Sal'salabim to SAI. (#15505)
* fix(DB/SAI): Move Floon,Raliq the Drunk and Sal'salabim to SAI. Co-authored-by: aletson <aletson@users.noreply.github.com> * Update Sal * add ooc emote 92 * set SheatheState to 1 --------- Co-authored-by: aletson <aletson@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,53 @@
|
|||||||
|
-- Co-authored-by: aletson <aletson@users.noreply.github.com> https://github.com/TrinityCore/TrinityCore/pull/20630
|
||||||
|
-- Floon(18588) & Raliq the Drunk(18585) & Sal'salabim(18584)
|
||||||
|
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` IN (18588,18585,18584);
|
||||||
|
|
||||||
|
-- Floon
|
||||||
|
DELETE FROM `smart_scripts` WHERE `entryorguid`=18588 AND `source_type`=0;
|
||||||
|
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`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(18588, 0, 0, 0, 0, 0, 100, 0, 2000, 2000, 30000, 30000, 0, 11, 6726, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Floon - In Combat - Cast \'Silence\''),
|
||||||
|
(18588, 0, 1, 0, 0, 0, 100, 0, 4000, 4000, 5000, 5000, 0, 11, 9672, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Floon - In Combat - Cast \'Frostbolt\''),
|
||||||
|
(18588, 0, 2, 0, 0, 0, 100, 0, 9000, 9000, 20000, 20000, 0, 11, 11831, 0, 0, 0, 0, 0, 2, 0, 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, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 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, 0, 2, 1738, 0, 0, 0, 0, 0, 1, 0, 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, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 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, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 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, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Floon - On Reset - Set Default Faction');
|
||||||
|
|
||||||
|
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 7732;
|
||||||
|
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||||
|
(15, 7732, 0, 0, 0, 9, 0, 10009, 0, 0, 0, 0, 0, '', 'Floon - Show gossip menu 7732 option id 0 if quest Crackin\' Some Skulls has been taken.');
|
||||||
|
|
||||||
|
-- Raliq the Drunk
|
||||||
|
UPDATE `creature_template_addon` SET `bytes2` = 1 WHERE `entry` = 18585;
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE `entryorguid`=18585 AND `source_type`=0;
|
||||||
|
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`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(18585, 0, 0, 0, 0, 0, 100, 0, 5000, 5000, 15000, 15000, 0, 11, 10966, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Raliq the Drunk - In Combat - Cast \'Uppercut\''),
|
||||||
|
(18585, 0, 1, 2, 62, 0, 100, 0, 7729, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Raliq the Drunk - On Gossip Option 0 Selected - Close Gossip'),
|
||||||
|
(18585, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 2, 45, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Raliq the Drunk - On Gossip Option 0 Selected - Set Faction Ogre'),
|
||||||
|
(18585, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Raliq the Drunk - On Gossip Option 0 Selected - Say Line 0'),
|
||||||
|
(18585, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Raliq the Drunk - On Gossip Option 0 Selected - Start Attacking'),
|
||||||
|
(18585, 0, 5, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Raliq the Drunk - On Reset - Set Default Faction'),
|
||||||
|
(18585, 0, 6, 0, 1, 0, 100, 0, 0, 0, 3600, 5000, 0, 5, 92, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Raliq the Drunk - Out of Combat - Play Emote 92 (ONESHOT_EAT_NOSHEATHE)');
|
||||||
|
|
||||||
|
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 7729;
|
||||||
|
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||||
|
(15, 7729, 0, 0, 0, 9, 0, 10009, 0, 0, 0, 0, 0, '', 'Raliq the Drunk - Show gossip menu 7729 option id 0 if quest Crackin\' Some Skulls has been taken.');
|
||||||
|
|
||||||
|
-- Sal'salabim
|
||||||
|
DELETE FROM `smart_scripts` WHERE `entryorguid`=18584 AND `source_type`=0;
|
||||||
|
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`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||||
|
(18584, 0, 0, 0, 9, 0, 100, 0, 8, 40, 15000, 15000, 0, 11, 31705, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sal\'salabim - Within 8-40 Range - Cast \'Magnetic Pull\''),
|
||||||
|
(18584, 0, 1, 2, 62, 0, 100, 0, 7725, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sal\'salabim - On Gossip Option 0 Selected - Close Gossip'),
|
||||||
|
(18584, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 0, 2, 90, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sal\'salabim - On Gossip Option 0 Selected - Set Faction Demon'),
|
||||||
|
(18584, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Sal\'salabim - On Gossip Option 0 Selected - Say Line 0'),
|
||||||
|
(18584, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Sal\'salabim - On Gossip Option 0 Selected - Start Attacking'),
|
||||||
|
(18584, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 42, 0, 19, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sal\'salabim - On Gossip Option 0 Selected - Set Invincibility Hp 19%'),
|
||||||
|
(18584, 0, 6, 7, 2, 0, 100, 1, 0, 20, 0, 0, 0, 15, 10004, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 'Sal\'salabim - On Health Below 20% - Quest Credit \'Patience and Understanding\''),
|
||||||
|
(18584, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sal\'salabim - On Health Below 20% - Evade'),
|
||||||
|
(18584, 0, 8, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sal\'salabim - On Reset - Set Default Faction');
|
||||||
|
|
||||||
|
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 15 AND `SourceGroup` = 7725;
|
||||||
|
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||||
|
(15, 7725, 0, 0, 0, 9, 0, 10004, 0, 0, 0, 0, 0, '', 'Sal\'salabim - Show gossip menu 7725 option id 0 if quest Patience and Understanding has been taken.');
|
||||||
@@ -15,21 +15,6 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ScriptData
|
|
||||||
SDName: Shattrath_City
|
|
||||||
SD%Complete: 100
|
|
||||||
SDComment: Quest support: 10004, 10009, 10211. Flask vendors, Teleport to Caverns of Time
|
|
||||||
SDCategory: Shattrath City
|
|
||||||
EndScriptData */
|
|
||||||
|
|
||||||
/* ContentData
|
|
||||||
npc_raliq_the_drunk
|
|
||||||
npc_salsalabim
|
|
||||||
npc_shattrathflaskvendors
|
|
||||||
npc_zephyr
|
|
||||||
npc_kservant
|
|
||||||
EndContentData */
|
|
||||||
|
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "ScriptMgr.h"
|
#include "ScriptMgr.h"
|
||||||
#include "ScriptedCreature.h"
|
#include "ScriptedCreature.h"
|
||||||
@@ -37,176 +22,6 @@ EndContentData */
|
|||||||
#include "ScriptedGossip.h"
|
#include "ScriptedGossip.h"
|
||||||
#include "TaskScheduler.h"
|
#include "TaskScheduler.h"
|
||||||
|
|
||||||
/*######
|
|
||||||
## npc_raliq_the_drunk
|
|
||||||
######*/
|
|
||||||
|
|
||||||
#define GOSSIP_RALIQ "You owe Sim'salabim money. Hand them over or die!"
|
|
||||||
|
|
||||||
enum Raliq
|
|
||||||
{
|
|
||||||
SPELL_UPPERCUT = 10966,
|
|
||||||
QUEST_CRACK_SKULLS = 10009,
|
|
||||||
EMOTE_DRINK = 7,
|
|
||||||
};
|
|
||||||
|
|
||||||
class npc_raliq_the_drunk : public CreatureScript
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
npc_raliq_the_drunk() : CreatureScript("npc_raliq_the_drunk") { }
|
|
||||||
|
|
||||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
|
||||||
{
|
|
||||||
ClearGossipMenuFor(player);
|
|
||||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
|
||||||
{
|
|
||||||
CloseGossipMenuFor(player);
|
|
||||||
creature->SetFaction(FACTION_OGRE);
|
|
||||||
creature->AI()->AttackStart(player);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool OnGossipHello(Player* player, Creature* creature) override
|
|
||||||
{
|
|
||||||
if (player->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE)
|
|
||||||
AddGossipItemFor(player, GOSSIP_ICON_VENDOR, GOSSIP_RALIQ, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
|
||||||
|
|
||||||
SendGossipMenuFor(player, 9440, creature->GetGUID());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
|
||||||
{
|
|
||||||
return new npc_raliq_the_drunkAI(creature);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct npc_raliq_the_drunkAI : public ScriptedAI
|
|
||||||
{
|
|
||||||
npc_raliq_the_drunkAI(Creature* creature) : ScriptedAI(creature)
|
|
||||||
{
|
|
||||||
m_uiNormFaction = creature->GetFaction();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32 m_uiNormFaction;
|
|
||||||
|
|
||||||
void Reset() override
|
|
||||||
{
|
|
||||||
me->RestoreFaction();
|
|
||||||
_scheduler.CancelAll();
|
|
||||||
_scheduler.Schedule(5s, [this](TaskContext context)
|
|
||||||
{
|
|
||||||
me->HandleEmoteCommand(EMOTE_DRINK);
|
|
||||||
context.Repeat(5s);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void JustEngagedWith(Unit* /*who*/) override
|
|
||||||
{
|
|
||||||
_scheduler
|
|
||||||
.Schedule(5s, [this](TaskContext context)
|
|
||||||
{
|
|
||||||
DoCastVictim(SPELL_UPPERCUT);
|
|
||||||
context.Repeat(15s);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
|
||||||
{
|
|
||||||
|
|
||||||
_scheduler.Update(diff);
|
|
||||||
|
|
||||||
if (!UpdateVictim())
|
|
||||||
return;
|
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
|
||||||
}
|
|
||||||
private:
|
|
||||||
TaskScheduler _scheduler;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/*######
|
|
||||||
# npc_salsalabim
|
|
||||||
######*/
|
|
||||||
|
|
||||||
enum Salsalabim
|
|
||||||
{
|
|
||||||
// Quests
|
|
||||||
QUEST_10004 = 10004,
|
|
||||||
|
|
||||||
// Spells
|
|
||||||
SPELL_MAGNETIC_PULL = 31705
|
|
||||||
};
|
|
||||||
|
|
||||||
class npc_salsalabim : public CreatureScript
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
npc_salsalabim() : CreatureScript("npc_salsalabim") { }
|
|
||||||
|
|
||||||
bool OnGossipHello(Player* player, Creature* creature) override
|
|
||||||
{
|
|
||||||
if (player->GetQuestStatus(QUEST_10004) == QUEST_STATUS_INCOMPLETE)
|
|
||||||
{
|
|
||||||
creature->SetFaction(FACTION_DEMON);
|
|
||||||
creature->AI()->AttackStart(player);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (creature->IsQuestGiver())
|
|
||||||
player->PrepareQuestMenu(creature->GetGUID());
|
|
||||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
|
||||||
{
|
|
||||||
return new npc_salsalabimAI(creature);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct npc_salsalabimAI : public ScriptedAI
|
|
||||||
{
|
|
||||||
npc_salsalabimAI(Creature* creature) : ScriptedAI(creature) { }
|
|
||||||
|
|
||||||
uint32 MagneticPull_Timer;
|
|
||||||
|
|
||||||
void Reset() override
|
|
||||||
{
|
|
||||||
MagneticPull_Timer = 15000;
|
|
||||||
me->RestoreFaction();
|
|
||||||
}
|
|
||||||
|
|
||||||
void DamageTaken(Unit* done_by, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
|
||||||
{
|
|
||||||
// xinef: some corrections
|
|
||||||
if (done_by)
|
|
||||||
if (Player* player = done_by->GetCharmerOrOwnerPlayerOrPlayerItself())
|
|
||||||
if (me->HealthBelowPctDamaged(20, damage))
|
|
||||||
{
|
|
||||||
player->GroupEventHappens(QUEST_10004, me);
|
|
||||||
damage = 0;
|
|
||||||
EnterEvadeMode();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
|
||||||
{
|
|
||||||
if (!UpdateVictim())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (MagneticPull_Timer <= diff)
|
|
||||||
{
|
|
||||||
DoCastVictim(SPELL_MAGNETIC_PULL);
|
|
||||||
MagneticPull_Timer = 15000;
|
|
||||||
}
|
|
||||||
else MagneticPull_Timer -= diff;
|
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
##################################################
|
##################################################
|
||||||
Shattrath City Flask Vendors provides flasks to people exalted with 3 fActions:
|
Shattrath City Flask Vendors provides flasks to people exalted with 3 fActions:
|
||||||
@@ -436,8 +251,6 @@ public:
|
|||||||
|
|
||||||
void AddSC_shattrath_city()
|
void AddSC_shattrath_city()
|
||||||
{
|
{
|
||||||
new npc_raliq_the_drunk();
|
|
||||||
new npc_salsalabim();
|
|
||||||
new npc_shattrathflaskvendors();
|
new npc_shattrathflaskvendors();
|
||||||
new npc_zephyr();
|
new npc_zephyr();
|
||||||
new npc_kservant();
|
new npc_kservant();
|
||||||
|
|||||||
@@ -15,22 +15,6 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ScriptData
|
|
||||||
SDName: Terokkar_Forest
|
|
||||||
SD%Complete: 85
|
|
||||||
SDComment: Quest support: 9889, 10009, 10873, 10896, 10898, 11096, 10052, 10051. Skettis->Ogri'la Flight
|
|
||||||
SDCategory: Terokkar Forest
|
|
||||||
EndScriptData */
|
|
||||||
|
|
||||||
/* ContentData
|
|
||||||
npc_unkor_the_ruthless
|
|
||||||
npc_rotting_forest_rager
|
|
||||||
npc_netherweb_victim
|
|
||||||
npc_floon
|
|
||||||
npc_isla_starmane
|
|
||||||
npc_slim
|
|
||||||
EndContentData */
|
|
||||||
|
|
||||||
#include "Group.h"
|
#include "Group.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "ScriptMgr.h"
|
#include "ScriptMgr.h"
|
||||||
@@ -477,115 +461,6 @@ public:
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/*######
|
|
||||||
## npc_floon
|
|
||||||
######*/
|
|
||||||
|
|
||||||
#define GOSSIP_FLOON1 "You owe Sim'salabim money. Hand them over or die!"
|
|
||||||
#define GOSSIP_FLOON2 "Hand over the money or die...again!"
|
|
||||||
|
|
||||||
enum Floon
|
|
||||||
{
|
|
||||||
SAY_FLOON_ATTACK = 0,
|
|
||||||
|
|
||||||
SPELL_SILENCE = 6726,
|
|
||||||
SPELL_FROSTBOLT = 9672,
|
|
||||||
SPELL_FROST_NOVA = 11831,
|
|
||||||
|
|
||||||
QUEST_CRACK_SKULLS = 10009
|
|
||||||
};
|
|
||||||
|
|
||||||
class npc_floon : public CreatureScript
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
npc_floon() : CreatureScript("npc_floon") { }
|
|
||||||
|
|
||||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
|
||||||
{
|
|
||||||
ClearGossipMenuFor(player);
|
|
||||||
if (action == GOSSIP_ACTION_INFO_DEF)
|
|
||||||
{
|
|
||||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_FLOON2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
|
||||||
SendGossipMenuFor(player, 9443, creature->GetGUID());
|
|
||||||
}
|
|
||||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
|
||||||
{
|
|
||||||
CloseGossipMenuFor(player);
|
|
||||||
creature->SetFaction(FACTION_ARAKKOA);
|
|
||||||
creature->AI()->Talk(SAY_FLOON_ATTACK, player);
|
|
||||||
creature->AI()->AttackStart(player);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool OnGossipHello(Player* player, Creature* creature) override
|
|
||||||
{
|
|
||||||
if (player->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE)
|
|
||||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_FLOON1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
|
||||||
|
|
||||||
SendGossipMenuFor(player, 9442, creature->GetGUID());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
|
||||||
{
|
|
||||||
return new npc_floonAI(creature);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct npc_floonAI : public ScriptedAI
|
|
||||||
{
|
|
||||||
npc_floonAI(Creature* creature) : ScriptedAI(creature)
|
|
||||||
{
|
|
||||||
m_uiNormFaction = creature->GetFaction();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32 m_uiNormFaction;
|
|
||||||
uint32 Silence_Timer;
|
|
||||||
uint32 Frostbolt_Timer;
|
|
||||||
uint32 FrostNova_Timer;
|
|
||||||
|
|
||||||
void Reset() override
|
|
||||||
{
|
|
||||||
Silence_Timer = 2000;
|
|
||||||
Frostbolt_Timer = 4000;
|
|
||||||
FrostNova_Timer = 9000;
|
|
||||||
if (me->GetFaction() != m_uiNormFaction)
|
|
||||||
me->SetFaction(m_uiNormFaction);
|
|
||||||
}
|
|
||||||
|
|
||||||
void JustEngagedWith(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();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/*######
|
/*######
|
||||||
## npc_isla_starmane
|
## npc_isla_starmane
|
||||||
######*/
|
######*/
|
||||||
@@ -840,7 +715,6 @@ void AddSC_terokkar_forest()
|
|||||||
// Theirs
|
// Theirs
|
||||||
new npc_unkor_the_ruthless();
|
new npc_unkor_the_ruthless();
|
||||||
new npc_rotting_forest_rager();
|
new npc_rotting_forest_rager();
|
||||||
new npc_floon();
|
|
||||||
new npc_isla_starmane();
|
new npc_isla_starmane();
|
||||||
new go_skull_pile();
|
new go_skull_pile();
|
||||||
new npc_slim();
|
new npc_slim();
|
||||||
|
|||||||
Reference in New Issue
Block a user