mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Add support for quest 11626 (The Emissary) - patch by antihrists (thanks)
Closes issue #1061 --HG-- branch : trunk
This commit is contained in:
1
sql/updates/8058_world_item_template.sql
Normal file
1
sql/updates/8058_world_item_template.sql
Normal file
@@ -0,0 +1 @@
|
||||
UPDATE `item_template` SET `ScriptName`='item_Trident_of_Nazjan' WHERE `entry`=35850;
|
||||
@@ -1260,6 +1260,14 @@ void Spell::EffectDummy(uint32 i)
|
||||
m_caster->CastSpell(m_caster, 45088, true);
|
||||
return;
|
||||
}
|
||||
case 47170: // Impale Leviroth
|
||||
{
|
||||
if (!unitTarget && unitTarget->GetEntry() != 26452 && ((unitTarget->GetHealth() / unitTarget->GetMaxHealth()) * 100.0f) > 95.0f)
|
||||
return;
|
||||
|
||||
m_caster->DealDamage(unitTarget, unitTarget->GetMaxHealth()*0.93f);
|
||||
return;
|
||||
}
|
||||
case 49625: // Brave's Flare
|
||||
{
|
||||
//Trigger Brave's Flare Effect (with EffectTarget)
|
||||
|
||||
@@ -387,6 +387,27 @@ bool ItemUse_item_dehta_trap_smasher(Player* pPlayer, Item* /*pItem*/, const Spe
|
||||
return false;
|
||||
}
|
||||
|
||||
enum TheEmissary
|
||||
{
|
||||
QUEST_THE_EMISSARY = 11626,
|
||||
NPC_LEVIROTH = 26452
|
||||
};
|
||||
|
||||
bool ItemUse_item_Trident_of_Nazjan(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets)
|
||||
{
|
||||
if (pPlayer->GetQuestStatus(QUEST_THE_EMISSARY) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
if (Creature* pLeviroth = pPlayer->FindNearestCreature(NPC_LEVIROTH, 10.0f)) // spell range
|
||||
{
|
||||
pLeviroth->AI()->AttackStart(pPlayer);
|
||||
return false;
|
||||
} else
|
||||
pPlayer->SendEquipError(EQUIP_ERR_OUT_OF_RANGE, pItem, NULL);
|
||||
} else
|
||||
pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW ,pItem, NULL);
|
||||
return true;
|
||||
}
|
||||
|
||||
void AddSC_item_scripts()
|
||||
{
|
||||
Script *newscript;
|
||||
@@ -450,4 +471,9 @@ void AddSC_item_scripts()
|
||||
newscript->Name = "item_dehta_trap_smasher";
|
||||
newscript->pItemUse = &ItemUse_item_dehta_trap_smasher;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "item_Trident_of_Nazjan";
|
||||
newscript->pItemUse = &ItemUse_item_Trident_of_Nazjan;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user