fix(Core/DB) Quest 925 Cairne's Hoofprint (#8721)
Fixed to use proper gossip from db.
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1635085785347733398');
|
||||||
|
|
||||||
|
-- Add missing gossip text
|
||||||
|
DELETE FROM `gossip_menu` WHERE `MenuID`=5852 AND `TextID`=7014;
|
||||||
|
INSERT INTO `gossip_menu` (`MenuID`,`TextID`) VALUES (5852, 7014);
|
||||||
|
|
||||||
|
-- Add missing Gossip Option
|
||||||
|
DELETE FROM `gossip_menu_option` WHERE `MenuID`=5851;
|
||||||
|
INSERT INTO `gossip_menu_option` (`MenuID`,`OptionID`,`OptionIcon`,`OptionText`,`OptionBroadcastTextID`,`OptionType`,`OptionNpcFlag`,`ActionMenuID`,`ActionPoiID`,`BoxCoded`,`BoxMoney`,`BoxText`,`BoxBroadcastTextID`,`VerifiedBuild`) VALUES
|
||||||
|
(5851,0,0,"Chief Bloodhoof, this may sound like an odd request... but I have a young ward who is quite shy. You are a hero to him, and he asked me to get your hoofprint.",9670,1,1,5852,0,0,0,NULL,0,0);
|
||||||
|
|
||||||
|
-- Condition for Cairne Bloodhoof Gossip menu option condition type Quest taken
|
||||||
|
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=5851 AND `SourceEntry`=0 AND `SourceId`=0;
|
||||||
|
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||||
|
(15, 5851, 0, 0, 0, 9, 0, 925, 0, 0, 0, 0, 0, '', 'Show gossip menu 5851 option id 0 if quest Cairne''s Hoofprint has been taken.');
|
||||||
@@ -15,132 +15,126 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ScriptData
|
|
||||||
SDName: Thunder_Bluff
|
|
||||||
SD%Complete: 100
|
|
||||||
SDComment: Quest support: 925
|
|
||||||
SDCategory: Thunder Bluff
|
|
||||||
EndScriptData */
|
|
||||||
|
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "ScriptedCreature.h"
|
#include "ScriptedCreature.h"
|
||||||
#include "ScriptedGossip.h"
|
|
||||||
#include "ScriptMgr.h"
|
#include "ScriptMgr.h"
|
||||||
|
|
||||||
/*#####
|
/*#####
|
||||||
# npc_cairne_bloodhoof
|
# Support for Quest 925: Cairne's Hoofprint
|
||||||
######*/
|
######*/
|
||||||
|
|
||||||
|
// NPC 3057: Cairne Bloodhoof <High Chieftain>
|
||||||
enum CairneBloodhoof
|
enum CairneBloodhoof
|
||||||
{
|
{
|
||||||
SPELL_BERSERKER_CHARGE = 16636,
|
SPELL_BERSERKER_CHARGE = 16636,
|
||||||
SPELL_CLEAVE = 16044,
|
SPELL_CLEAVE = 16044,
|
||||||
SPELL_MORTAL_STRIKE = 16856,
|
SPELL_MORTAL_STRIKE = 16856,
|
||||||
SPELL_THUNDERCLAP = 23931,
|
SPELL_THUNDERCLAP = 23931,
|
||||||
SPELL_UPPERCUT = 22916
|
SPELL_UPPERCUT = 22916,
|
||||||
|
SPELL_CAIRNES_HOOFPRINT = 23123
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GOSSIP_HCB "I know this is rather silly but a young ward who is a bit shy would like your hoofprint."
|
// @todo verify abilities/timers
|
||||||
/// @todo verify abilities/timers
|
|
||||||
class npc_cairne_bloodhoof : public CreatureScript
|
class npc_cairne_bloodhoof : public CreatureScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
npc_cairne_bloodhoof() : CreatureScript("npc_cairne_bloodhoof") { }
|
npc_cairne_bloodhoof() : CreatureScript("npc_cairne_bloodhoof") { }
|
||||||
|
|
||||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
struct npc_cairne_bloodhoofAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
ClearGossipMenuFor(player);
|
npc_cairne_bloodhoofAI(Creature* creature) : ScriptedAI(creature) { }
|
||||||
if (action == GOSSIP_SENDER_INFO)
|
|
||||||
|
void Reset() override
|
||||||
{
|
{
|
||||||
player->CastSpell(player, 23123, false);
|
_berserkerChargeTimer = 30000;
|
||||||
SendGossipMenuFor(player, 7014, creature->GetGUID());
|
_cleaveTimer = 5000;
|
||||||
|
_mortalStrikeTimer = 10000;
|
||||||
|
_thunderclapTimer = 15000;
|
||||||
|
_uppercutTimer = 10000;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool OnGossipHello(Player* player, Creature* creature) override
|
void sGossipSelect(Player* player, uint32 /*sender*/, uint32 action) override
|
||||||
{
|
{
|
||||||
if (creature->IsQuestGiver())
|
if (action == 0)
|
||||||
player->PrepareQuestMenu(creature->GetGUID());
|
{
|
||||||
|
player->CastSpell(player, SPELL_CAIRNES_HOOFPRINT, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (player->GetQuestStatus(925) == QUEST_STATUS_INCOMPLETE)
|
void UpdateAI(uint32 diff) override
|
||||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_HCB, GOSSIP_SENDER_MAIN, GOSSIP_SENDER_INFO);
|
{
|
||||||
|
if (!UpdateVictim())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SendGossipMenuFor(player, 7013, creature->GetGUID());
|
if (_berserkerChargeTimer <= diff)
|
||||||
|
{
|
||||||
|
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||||
|
{
|
||||||
|
DoCast(target, SPELL_BERSERKER_CHARGE);
|
||||||
|
}
|
||||||
|
_berserkerChargeTimer = 25000;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_berserkerChargeTimer -= diff;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
if (_uppercutTimer <= diff)
|
||||||
}
|
{
|
||||||
|
DoCastVictim(SPELL_UPPERCUT);
|
||||||
|
_uppercutTimer = 20000;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_uppercutTimer -= diff;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_thunderclapTimer <= diff)
|
||||||
|
{
|
||||||
|
DoCastVictim(SPELL_THUNDERCLAP);
|
||||||
|
_thunderclapTimer = 15000;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_thunderclapTimer -= diff;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_mortalStrikeTimer <= diff)
|
||||||
|
{
|
||||||
|
DoCastVictim(SPELL_MORTAL_STRIKE);
|
||||||
|
_mortalStrikeTimer = 15000;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_mortalStrikeTimer -= diff;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_cleaveTimer <= diff)
|
||||||
|
{
|
||||||
|
DoCastVictim(SPELL_CLEAVE);
|
||||||
|
_cleaveTimer = 7000;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_cleaveTimer -= diff;
|
||||||
|
}
|
||||||
|
|
||||||
|
DoMeleeAttackIfReady();
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
uint32 _berserkerChargeTimer;
|
||||||
|
uint32 _cleaveTimer;
|
||||||
|
uint32 _mortalStrikeTimer;
|
||||||
|
uint32 _thunderclapTimer;
|
||||||
|
uint32 _uppercutTimer;
|
||||||
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return new npc_cairne_bloodhoofAI(creature);
|
return new npc_cairne_bloodhoofAI(creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct npc_cairne_bloodhoofAI : public ScriptedAI
|
|
||||||
{
|
|
||||||
npc_cairne_bloodhoofAI(Creature* creature) : ScriptedAI(creature) { }
|
|
||||||
|
|
||||||
uint32 BerserkerChargeTimer;
|
|
||||||
uint32 CleaveTimer;
|
|
||||||
uint32 MortalStrikeTimer;
|
|
||||||
uint32 ThunderclapTimer;
|
|
||||||
uint32 UppercutTimer;
|
|
||||||
|
|
||||||
void Reset() override
|
|
||||||
{
|
|
||||||
BerserkerChargeTimer = 30000;
|
|
||||||
CleaveTimer = 5000;
|
|
||||||
MortalStrikeTimer = 10000;
|
|
||||||
ThunderclapTimer = 15000;
|
|
||||||
UppercutTimer = 10000;
|
|
||||||
}
|
|
||||||
|
|
||||||
void EnterCombat(Unit* /*who*/) override { }
|
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
|
||||||
{
|
|
||||||
if (!UpdateVictim())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (BerserkerChargeTimer <= diff)
|
|
||||||
{
|
|
||||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
|
||||||
DoCast(target, SPELL_BERSERKER_CHARGE);
|
|
||||||
BerserkerChargeTimer = 25000;
|
|
||||||
}
|
|
||||||
else BerserkerChargeTimer -= diff;
|
|
||||||
|
|
||||||
if (UppercutTimer <= diff)
|
|
||||||
{
|
|
||||||
DoCastVictim(SPELL_UPPERCUT);
|
|
||||||
UppercutTimer = 20000;
|
|
||||||
}
|
|
||||||
else UppercutTimer -= diff;
|
|
||||||
|
|
||||||
if (ThunderclapTimer <= diff)
|
|
||||||
{
|
|
||||||
DoCastVictim(SPELL_THUNDERCLAP);
|
|
||||||
ThunderclapTimer = 15000;
|
|
||||||
}
|
|
||||||
else ThunderclapTimer -= diff;
|
|
||||||
|
|
||||||
if (MortalStrikeTimer <= diff)
|
|
||||||
{
|
|
||||||
DoCastVictim(SPELL_MORTAL_STRIKE);
|
|
||||||
MortalStrikeTimer = 15000;
|
|
||||||
}
|
|
||||||
else MortalStrikeTimer -= diff;
|
|
||||||
|
|
||||||
if (CleaveTimer <= diff)
|
|
||||||
{
|
|
||||||
DoCastVictim(SPELL_CLEAVE);
|
|
||||||
CleaveTimer = 7000;
|
|
||||||
}
|
|
||||||
else CleaveTimer -= diff;
|
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_thunder_bluff()
|
void AddSC_thunder_bluff()
|
||||||
|
|||||||
Reference in New Issue
Block a user