mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Scripts/The Barrens: Beaten Corpse (#24124)
* Scripts/The Barrens: Beaten Corpse
* Rename 9999_99_99_99_world.sql to 2020_02_01_00_world.sql
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 74d19691a5)
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`="" WHERE `entry`=10668;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=10668 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`, `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
|
||||
(10668,0,0,0,62,0,100,0,2871,0,0,0,33,10668,0,0,0,0,0,7,0,0,0,0,0,0,0,'Beaten Corpse - On gossip select - Credit quest');
|
||||
@@ -35,42 +35,6 @@ EndContentData */
|
||||
#include "SpellInfo.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
/*######
|
||||
## npc_beaten_corpse
|
||||
######*/
|
||||
|
||||
enum BeatenCorpse
|
||||
{
|
||||
GOSSIP_OPTION_ID_BEATEN_CORPSE = 0,
|
||||
GOSSIP_MENU_OPTION_INSPECT_BODY = 2871
|
||||
};
|
||||
|
||||
class npc_beaten_corpse : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_beaten_corpse() : CreatureScript("npc_beaten_corpse") { }
|
||||
|
||||
struct npc_beaten_corpseAI : public ScriptedAI
|
||||
{
|
||||
npc_beaten_corpseAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
bool GossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override
|
||||
{
|
||||
if (menuId == GOSSIP_MENU_OPTION_INSPECT_BODY && gossipListId == GOSSIP_OPTION_ID_BEATEN_CORPSE)
|
||||
{
|
||||
CloseGossipMenuFor(player);
|
||||
player->TalkedToCreature(me->GetEntry(), me->GetGUID());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_beaten_corpseAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
# npc_gilthares
|
||||
######*/
|
||||
|
||||
Reference in New Issue
Block a user