mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-06 17:08:23 +01:00
DB/Creature: Convert & update support for Ashyen & Keleth to SAI
Closes #24635
(cherry picked from commit a2068cade5)
This commit is contained in:
@@ -18,12 +18,10 @@
|
||||
/* ScriptData
|
||||
SDName: Zangarmarsh
|
||||
SD%Complete: 100
|
||||
SDComment: Quest support: 9752, 9785, Mark Of ... buffs.
|
||||
SDCategory: Zangarmarsh
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npcs_ashyen_and_keleth
|
||||
npc_kayra_longmane
|
||||
EndContentData */
|
||||
|
||||
@@ -32,125 +30,6 @@ EndContentData */
|
||||
#include "ScriptedGossip.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
|
||||
/*######
|
||||
## npcs_ashyen_and_keleth
|
||||
######*/
|
||||
|
||||
#define GOSSIP_ITEM_BLESS_ASH "Grant me your mark, wise ancient."
|
||||
#define GOSSIP_ITEM_BLESS_KEL "Grant me your mark, mighty ancient."
|
||||
|
||||
enum AshyenAndKeleth
|
||||
{
|
||||
NPC_ASHYEN = 17900,
|
||||
NPC_KELETH = 17901,
|
||||
|
||||
SPELL_BLESS_ASH_EXA = 31815,
|
||||
SPELL_BLESS_ASH_REV = 31811,
|
||||
SPELL_BLESS_ASH_HON = 31810,
|
||||
SPELL_BLESS_ASH_FRI = 31808,
|
||||
|
||||
SPELL_BLESS_KEL_EXA = 31814,
|
||||
SPELL_BLESS_KEL_REV = 31813,
|
||||
SPELL_BLESS_KEL_HON = 31812,
|
||||
SPELL_BLESS_KEL_FRI = 31807
|
||||
};
|
||||
|
||||
class npcs_ashyen_and_keleth : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npcs_ashyen_and_keleth() : CreatureScript("npcs_ashyen_and_keleth") { }
|
||||
|
||||
struct npcs_ashyen_and_kelethAI : public ScriptedAI
|
||||
{
|
||||
npcs_ashyen_and_kelethAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
bool GossipHello(Player* player) override
|
||||
{
|
||||
if (player->GetReputationRank(942) > REP_NEUTRAL)
|
||||
{
|
||||
if (me->GetEntry() == NPC_ASHYEN)
|
||||
AddGossipItemFor(player, GossipOptionIcon::None, GOSSIP_ITEM_BLESS_ASH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
|
||||
if (me->GetEntry() == NPC_KELETH)
|
||||
AddGossipItemFor(player, GossipOptionIcon::None, GOSSIP_ITEM_BLESS_KEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
}
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(me), me->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect(Player* player, uint32 /*menuId*/, uint32 gossipListId) override
|
||||
{
|
||||
uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId);
|
||||
ClearGossipMenuFor(player);
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
{
|
||||
me->SetPowerType(POWER_MANA);
|
||||
me->SetMaxPower(POWER_MANA, 200); //set a "fake" mana value, we can't depend on database doing it in this case
|
||||
me->SetPower(POWER_MANA, 200);
|
||||
|
||||
if (me->GetEntry() == NPC_ASHYEN) //check which Creature we are dealing with
|
||||
{
|
||||
uint32 spell = 0;
|
||||
switch (player->GetReputationRank(942))
|
||||
{ //mark of lore
|
||||
case REP_FRIENDLY:
|
||||
spell = SPELL_BLESS_ASH_FRI;
|
||||
break;
|
||||
case REP_HONORED:
|
||||
spell = SPELL_BLESS_ASH_HON;
|
||||
break;
|
||||
case REP_REVERED:
|
||||
spell = SPELL_BLESS_ASH_REV;
|
||||
break;
|
||||
case REP_EXALTED:
|
||||
spell = SPELL_BLESS_ASH_EXA;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (spell)
|
||||
DoCast(player, spell, true);
|
||||
}
|
||||
|
||||
if (me->GetEntry() == NPC_KELETH)
|
||||
{
|
||||
uint32 spell = 0;
|
||||
switch (player->GetReputationRank(942)) //mark of war
|
||||
{
|
||||
case REP_FRIENDLY:
|
||||
spell = SPELL_BLESS_KEL_FRI;
|
||||
break;
|
||||
case REP_HONORED:
|
||||
spell = SPELL_BLESS_KEL_HON;
|
||||
break;
|
||||
case REP_REVERED:
|
||||
spell = SPELL_BLESS_KEL_REV;
|
||||
break;
|
||||
case REP_EXALTED:
|
||||
spell = SPELL_BLESS_KEL_EXA;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (spell)
|
||||
DoCast(player, spell, true);
|
||||
}
|
||||
CloseGossipMenuFor(player);
|
||||
player->TalkedToCreature(me->GetEntry(), me->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npcs_ashyen_and_kelethAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_kayra_longmane
|
||||
######*/
|
||||
@@ -232,6 +111,5 @@ public:
|
||||
|
||||
void AddSC_zangarmarsh()
|
||||
{
|
||||
new npcs_ashyen_and_keleth();
|
||||
new npc_kayra_longmane();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user