Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2023-04-13 10:42:03 -06:00
committed by GitHub
5 changed files with 57 additions and 71 deletions

View File

@@ -15,20 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: Netherstorm
SD%Complete: 80
SDComment: Quest support: 10337, 10438, 10652 (special flight paths), 10198, 10191
SDCategory: Netherstorm
EndScriptData */
/* ContentData
npc_commander_dawnforge
npc_bessy
npc_maxx_a_million
go_captain_tyralius_prison
EndContentData */
#include "GameObjectAI.h"
#include "Player.h"
#include "ScriptMgr.h"
@@ -59,7 +45,11 @@ enum saeed
QUEST_DIMENSIUS_DEVOURING = 10439,
SPELL_DIMENSIUS_TRANSFORM = 35939
SPELL_DIMENSIUS_TRANSFORM = 35939,
GOSSIP_MENU_SAEED = 8228,
TEXT_NPC_SAEED_DEFAULT = 10229,
TEXT_NPC_SAEED_START_FIGHT = 10232,
};
class npc_captain_saeed : public CreatureScript
@@ -280,12 +270,12 @@ public:
if (player->GetQuestStatus(QUEST_DIMENSIUS_DEVOURING) == QUEST_STATUS_INCOMPLETE)
{
if (!creature->AI()->GetData(1))
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Let's move out.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
AddGossipItemFor(player, GOSSIP_MENU_SAEED, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
else
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Let's start the battle.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
AddGossipItemFor(player, GOSSIP_MENU_SAEED, 1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
}
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
SendGossipMenuFor(player, creature->AI()->GetData(1) ? TEXT_NPC_SAEED_START_FIGHT : TEXT_NPC_SAEED_DEFAULT, creature->GetGUID());
return true;
}
@@ -587,56 +577,6 @@ public:
}
};
/*######
## npc_professor_dabiri
######*/
enum ProfessorDabiriData
{
SPELL_PHASE_DISTRUPTOR = 35780,
//WHISPER_DABIRI = 0, not existing in database
QUEST_DIMENSIUS = 10439,
QUEST_ON_NETHERY_WINGS = 10438,
};
#define GOSSIP_ITEM "I need a new phase distruptor, Professor"
class npc_professor_dabiri : public CreatureScript
{
public:
npc_professor_dabiri() : CreatureScript("npc_professor_dabiri") { }
//OnQuestAccept:
//if (quest->GetQuestId() == QUEST_DIMENSIUS)
//creature->AI()->Talk(WHISPER_DABIRI, player);
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
{
ClearGossipMenuFor(player);
if (action == GOSSIP_ACTION_INFO_DEF + 1)
{
creature->CastSpell(player, SPELL_PHASE_DISTRUPTOR, false);
CloseGossipMenuFor(player);
}
return true;
}
bool OnGossipHello(Player* player, Creature* creature) override
{
if (creature->IsQuestGiver())
player->PrepareQuestMenu(creature->GetGUID());
if (player->GetQuestStatus(QUEST_ON_NETHERY_WINGS) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(29778))
AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
return true;
}
};
/*######
## npc_phase_hunter
######*/
@@ -979,7 +919,6 @@ void AddSC_netherstorm()
// Theirs
new npc_commander_dawnforge();
new at_commander_dawnforge();
new npc_professor_dabiri();
new npc_phase_hunter();
new npc_bessy();
new npc_maxx_a_million_escort();

View File

@@ -2030,8 +2030,7 @@ class spell_gen_animal_blood : public AuraScript
{
if (Unit* owner = GetUnitOwner())
{
if (owner->IsInWater())
owner->CastSpell(owner, SPELL_SPAWN_BLOOD_POOL, true);
owner->CastSpell(owner, SPELL_SPAWN_BLOOD_POOL, true);
}
}
@@ -2042,6 +2041,27 @@ class spell_gen_animal_blood : public AuraScript
}
};
// 63471 - Spawn Blood Pool
class spell_spawn_blood_pool : public SpellScript
{
PrepareSpellScript(spell_spawn_blood_pool);
void SetDest(SpellDestination &dest)
{
Unit* caster = GetCaster();
LiquidData liquidStatus = caster->GetMap()->GetLiquidData(caster->GetPhaseMask(), caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ(), caster->GetCollisionHeight(), MAP_ALL_LIQUIDS);
float level = liquidStatus.Level > INVALID_HEIGHT ? liquidStatus.Level : caster->GetPositionZ();
Position pos = Position(caster->GetPositionX(), caster->GetPositionY(), level, caster->GetOrientation());
dest.Relocate(pos);
}
void Register() override
{
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_spawn_blood_pool::SetDest, EFFECT_0, TARGET_DEST_CASTER);
}
};
enum DivineStormSpell
{
SPELL_DIVINE_STORM = 53385,
@@ -4893,6 +4913,7 @@ void AddSC_generic_spell_scripts()
RegisterSpellScript(spell_gen_feign_death_no_prevent_emotes);
RegisterSpellScript(spell_pvp_trinket_wotf_shared_cd);
RegisterSpellScript(spell_gen_animal_blood);
RegisterSpellScript(spell_spawn_blood_pool);
RegisterSpellScript(spell_gen_divine_storm_cd_reset);
RegisterSpellScript(spell_gen_profession_research);
RegisterSpellScript(spell_gen_clone);