mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 23:56:25 +00:00
fix(DB/SAI): Move Ashyen & Keleth to SAI. (#15502)
Co-authored-by: offl <offl@users.noreply.github.com>
This commit is contained in:
@@ -15,146 +15,12 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Zangarmarsh
|
||||
SD%Complete: 100
|
||||
SDComment: Quest support: 9752, 9785, 9803, 10009. Mark Of ... buffs.
|
||||
SDCategory: Zangarmarsh
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npcs_ashyen_and_keleth
|
||||
npc_cooshcoosh
|
||||
npc_elder_kuruti
|
||||
npc_mortog_steamhead
|
||||
npc_kayra_longmane
|
||||
npc_timothy_daniels
|
||||
EndContentData */
|
||||
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "ScriptedGossip.h"
|
||||
|
||||
// Theirs
|
||||
/*######
|
||||
## 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
|
||||
{
|
||||
GOSSIP_REWARD_BLESS = 0,
|
||||
|
||||
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") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) override
|
||||
{
|
||||
if (player->GetReputationRank(942) > REP_NEUTRAL)
|
||||
{
|
||||
if (creature->GetEntry() == NPC_ASHYEN)
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_ASH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
|
||||
if (creature->GetEntry() == NPC_KELETH)
|
||||
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM_BLESS_KEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
}
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
|
||||
{
|
||||
ClearGossipMenuFor(player);
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
{
|
||||
creature->setPowerType(POWER_MANA);
|
||||
creature->SetMaxPower(POWER_MANA, 200); //set a "fake" mana value, we can't depend on database doing it in this case
|
||||
creature->SetPower(POWER_MANA, 200);
|
||||
|
||||
if (creature->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)
|
||||
{
|
||||
creature->CastSpell(player, spell, true);
|
||||
creature->AI()->Talk(GOSSIP_REWARD_BLESS);
|
||||
}
|
||||
}
|
||||
|
||||
if (creature->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)
|
||||
{
|
||||
creature->CastSpell(player, spell, true);
|
||||
creature->AI()->Talk(GOSSIP_REWARD_BLESS);
|
||||
}
|
||||
}
|
||||
CloseGossipMenuFor(player);
|
||||
player->TalkedToCreature(creature->GetEntry(), creature->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_cooshcoosh
|
||||
######*/
|
||||
@@ -451,7 +317,6 @@ public:
|
||||
void AddSC_zangarmarsh()
|
||||
{
|
||||
// Theirs
|
||||
new npcs_ashyen_and_keleth();
|
||||
new npc_cooshcoosh();
|
||||
new npc_elder_kuruti();
|
||||
new npc_mortog_steamhead();
|
||||
|
||||
Reference in New Issue
Block a user