mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-27 04:12:40 +01:00
Merge remote-tracking branch 'origin/master' into 4.3.4
Conflicts: src/server/scripts/Kalimdor/zone_the_barrens.cpp
This commit is contained in:
@@ -31,8 +31,6 @@ enum Spells
|
||||
SPELL_TELEPORT_DARNASSUS = 9268
|
||||
};
|
||||
|
||||
#define GOSSIP_ITEM_MORRIDUNE "Please port me to Darnassus"
|
||||
|
||||
const Position HomePosition = {-815.817f, -145.299f, -25.870f, 0};
|
||||
|
||||
class go_blackfathom_altar : public GameObjectScript
|
||||
@@ -201,32 +199,6 @@ class npc_morridune : public CreatureScript
|
||||
public:
|
||||
npc_morridune() : CreatureScript("npc_morridune") { }
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) OVERRIDE
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
player->TeleportTo(1, 9952.239f, 2284.277f, 1341.394f, 1.595f);
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_MORRIDUNE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_morriduneAI(creature);
|
||||
}
|
||||
|
||||
struct npc_morriduneAI : public npc_escortAI
|
||||
{
|
||||
npc_morriduneAI(Creature* creature) : npc_escortAI(creature)
|
||||
@@ -248,7 +220,17 @@ public:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) OVERRIDE
|
||||
{
|
||||
DoCast(player, SPELL_TELEPORT_DARNASSUS);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_morriduneAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_blackfathom_deeps()
|
||||
|
||||
@@ -39,54 +39,64 @@ EndContentData */
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_GOLDTHORN_TEA = 13028,
|
||||
SPELL_TEACHING_GOLDTHORN_TEA = 13029,
|
||||
SPELL_MIGHT_TROLLS_BLOOD_POTION = 3451,
|
||||
SPELL_TEACHING_MIGHTY_TROLLS_BLOOD_POTION = 13030,
|
||||
SPELL_TEACHING_MIGHTY_TROLLS_BLOOD_POTION = 13030
|
||||
};
|
||||
|
||||
enum Gossips
|
||||
{
|
||||
GOSSIP_TEXT_TEA_ANSWER = 2114,
|
||||
GOSSIP_TEXT_POTION_ANSWER = 2115,
|
||||
GOSSIP_COOKING_SKILL_HIGH = 1444,
|
||||
GOSSIP_COOKING_SKILL_LOW = 1501,
|
||||
GOSSIP_ALCHEMY_SKILL_HIGH = 1442,
|
||||
GOSSIP_ALCHEMY_SKILL_LOW = 1502
|
||||
};
|
||||
|
||||
#define GOSSIP_ITEM_TEA "Teach me the cooking recipe"
|
||||
#define GOSSIP_ITEM_POTION "Teach me the alchemy recipe"
|
||||
|
||||
class npc_henry_stern : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_henry_stern() : CreatureScript("npc_henry_stern") { }
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
|
||||
struct npc_henry_sternAI : public ScriptedAI
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
npc_henry_sternAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void sGossipSelect(Player* player, uint32 /*sender*/, uint32 action) OVERRIDE
|
||||
{
|
||||
player->CastSpell(player, SPELL_TEACHING_GOLDTHORN_TEA, true);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXT_TEA_ANSWER, creature->GetGUID());
|
||||
if (action == 0)
|
||||
{
|
||||
if (player->GetBaseSkillValue(SKILL_COOKING) >= 175)
|
||||
{
|
||||
player->PrepareGossipMenu(me, GOSSIP_COOKING_SKILL_HIGH);
|
||||
player->SendPreparedGossip(me);
|
||||
DoCast(player, SPELL_TEACHING_GOLDTHORN_TEA);
|
||||
}
|
||||
else
|
||||
{
|
||||
player->PrepareGossipMenu(me, GOSSIP_COOKING_SKILL_LOW);
|
||||
player->SendPreparedGossip(me);
|
||||
}
|
||||
}
|
||||
|
||||
if (action == 1)
|
||||
{
|
||||
if (player->GetBaseSkillValue(SKILL_ALCHEMY) >= 180)
|
||||
{
|
||||
player->PrepareGossipMenu(me, GOSSIP_ALCHEMY_SKILL_HIGH);
|
||||
player->SendPreparedGossip(me);
|
||||
DoCast(player, SPELL_TEACHING_MIGHTY_TROLLS_BLOOD_POTION);
|
||||
}
|
||||
else
|
||||
{
|
||||
player->PrepareGossipMenu(me, GOSSIP_ALCHEMY_SKILL_LOW);
|
||||
player->SendPreparedGossip(me);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (action == GOSSIP_ACTION_INFO_DEF + 2)
|
||||
{
|
||||
player->CastSpell(player, SPELL_TEACHING_MIGHTY_TROLLS_BLOOD_POTION, true);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXT_POTION_ANSWER, creature->GetGUID());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
if (player->GetBaseSkillValue(SKILL_COOKING) >= 175 && !player->HasSpell(SPELL_GOLDTHORN_TEA))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
|
||||
if (player->GetBaseSkillValue(SKILL_ALCHEMY) >= 180 && !player->HasSpell(SPELL_MIGHT_TROLLS_BLOOD_POTION))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_POTION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
return true;
|
||||
return new npc_henry_sternAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -170,42 +170,6 @@ public:
|
||||
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_sputtervalve
|
||||
######*/
|
||||
|
||||
#define GOSSIP_SPUTTERVALVE "Can you tell me about this shard?"
|
||||
|
||||
class npc_sputtervalve : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_sputtervalve() : CreatureScript("npc_sputtervalve") { }
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
if (action == GOSSIP_ACTION_INFO_DEF)
|
||||
{
|
||||
player->SEND_GOSSIP_MENU(2013, creature->GetGUID());
|
||||
player->AreaExploredOrEventHappens(6981);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (player->GetQuestStatus(6981) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SPUTTERVALVE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_taskmaster_fizzule
|
||||
######*/
|
||||
|
||||
Reference in New Issue
Block a user