Implemented script for item Petrov's Cluster Bombs, code from ScriptDev2.
--HG-- branch : trunk
This commit is contained in:
@@ -287,6 +287,35 @@ bool ItemUse_item_pile_fake_furs(Player *pPlayer, Item *pItem, SpellCastTargets
|
||||
return false;
|
||||
}
|
||||
|
||||
/*#####
|
||||
# item_petrov_cluster_bombs
|
||||
#####*/
|
||||
|
||||
enum ePetrovClusterBombs
|
||||
{
|
||||
SPELL_PETROV_BOMB = 42406,
|
||||
AREA_ID_SHATTERED_STRAITS = 4064,
|
||||
ZONE_ID_HOWLING = 495
|
||||
};
|
||||
|
||||
bool ItemUse_item_petrov_cluster_bombs(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets)
|
||||
{
|
||||
if (pPlayer->GetZoneId() != ZONE_ID_HOWLING)
|
||||
return false;
|
||||
|
||||
if (!pPlayer->GetTransport() || pPlayer->GetAreaId() != AREA_ID_SHATTERED_STRAITS)
|
||||
{
|
||||
pPlayer->SendEquipError(EQUIP_ERR_NONE, pItem, NULL);
|
||||
|
||||
if (const SpellEntry* pSpellInfo = GetSpellStore()->LookupEntry(SPELL_PETROV_BOMB))
|
||||
Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_NOT_HERE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void AddSC_item_scripts()
|
||||
{
|
||||
Script *newscript;
|
||||
@@ -340,5 +369,9 @@ void AddSC_item_scripts()
|
||||
newscript->Name = "item_pile_fake_furs";
|
||||
newscript->pItemUse = &ItemUse_item_pile_fake_furs;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "item_petrov_cluster_bombs";
|
||||
newscript->pItemUse = &ItemUse_item_petrov_cluster_bombs;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user