aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/include/sc_gossip.h101
-rw-r--r--src/bindings/scripts/scripts/item/item_scripts.cpp446
-rw-r--r--src/bindings/scripts/scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp1
-rw-r--r--src/bindings/scripts/scripts/zone/magisters_terrace/magisters_terrace.cpp29
-rw-r--r--src/bindings/scripts/scripts/zone/nexus/nexus/boss_anomalus.cpp35
-rw-r--r--src/bindings/scripts/scripts/zone/nexus/nexus/boss_keristrasza.cpp29
-rw-r--r--src/bindings/scripts/scripts/zone/nexus/nexus/boss_magus_telestra.cpp49
-rw-r--r--src/bindings/scripts/scripts/zone/nexus/nexus/boss_ormorok.cpp39
-rw-r--r--src/bindings/scripts/scripts/zone/scarlet_monastery/boss_mograine_and_whitemane.cpp14
9 files changed, 181 insertions, 562 deletions
diff --git a/src/bindings/scripts/include/sc_gossip.h b/src/bindings/scripts/include/sc_gossip.h
index 9665a7e1123..0bee1dca5c8 100644
--- a/src/bindings/scripts/include/sc_gossip.h
+++ b/src/bindings/scripts/include/sc_gossip.h
@@ -73,60 +73,59 @@
#define GOSSIP_TEXT_JEWELCRAFTING "Jewelcrafting"
#define GOSSIP_TEXT_INSCRIPTION "Inscription"
+enum
+{
// Skill defines
-
-#define TRADESKILL_ALCHEMY 1
-#define TRADESKILL_BLACKSMITHING 2
-#define TRADESKILL_COOKING 3
-#define TRADESKILL_ENCHANTING 4
-#define TRADESKILL_ENGINEERING 5
-#define TRADESKILL_FIRSTAID 6
-#define TRADESKILL_HERBALISM 7
-#define TRADESKILL_LEATHERWORKING 8
-#define TRADESKILL_POISONS 9
-#define TRADESKILL_TAILORING 10
-#define TRADESKILL_MINING 11
-#define TRADESKILL_FISHING 12
-#define TRADESKILL_SKINNING 13
-#define TRADESKILL_JEWLCRAFTING 14
-#define TRADESKILL_INSCRIPTION 15
-
-#define TRADESKILL_LEVEL_NONE 0
-#define TRADESKILL_LEVEL_APPRENTICE 1
-#define TRADESKILL_LEVEL_JOURNEYMAN 2
-#define TRADESKILL_LEVEL_EXPERT 3
-#define TRADESKILL_LEVEL_ARTISAN 4
-#define TRADESKILL_LEVEL_MASTER 5
-#define TRADESKILL_LEVEL_GRAND_MASTER 6
+ TRADESKILL_ALCHEMY = 1,
+ TRADESKILL_BLACKSMITHING = 2,
+ TRADESKILL_COOKING = 3,
+ TRADESKILL_ENCHANTING = 4,
+ TRADESKILL_ENGINEERING = 5,
+ TRADESKILL_FIRSTAID = 6,
+ TRADESKILL_HERBALISM = 7,
+ TRADESKILL_LEATHERWORKING = 8,
+ TRADESKILL_POISONS = 9,
+ TRADESKILL_TAILORING = 10,
+ TRADESKILL_MINING = 11,
+ TRADESKILL_FISHING = 12,
+ TRADESKILL_SKINNING = 13,
+ TRADESKILL_JEWLCRAFTING = 14,
+ TRADESKILL_INSCRIPTION = 15,
+
+ TRADESKILL_LEVEL_NONE = 0,
+ TRADESKILL_LEVEL_APPRENTICE = 1,
+ TRADESKILL_LEVEL_JOURNEYMAN = 2,
+ TRADESKILL_LEVEL_EXPERT = 3,
+ TRADESKILL_LEVEL_ARTISAN = 4,
+ TRADESKILL_LEVEL_MASTER = 5,
+ TRADESKILL_LEVEL_GRAND_MASTER = 6,
// Gossip defines
-
-#define GOSSIP_ACTION_TRADE 1
-#define GOSSIP_ACTION_TRAIN 2
-#define GOSSIP_ACTION_TAXI 3
-#define GOSSIP_ACTION_GUILD 4
-#define GOSSIP_ACTION_BATTLE 5
-#define GOSSIP_ACTION_BANK 6
-#define GOSSIP_ACTION_INN 7
-#define GOSSIP_ACTION_HEAL 8
-#define GOSSIP_ACTION_TABARD 9
-#define GOSSIP_ACTION_AUCTION 10
-#define GOSSIP_ACTION_INN_INFO 11
-#define GOSSIP_ACTION_UNLEARN 12
-#define GOSSIP_ACTION_INFO_DEF 1000
-
-#define GOSSIP_SENDER_MAIN 1
-#define GOSSIP_SENDER_INN_INFO 2
-#define GOSSIP_SENDER_INFO 3
-#define GOSSIP_SENDER_SEC_PROFTRAIN 4
-#define GOSSIP_SENDER_SEC_CLASSTRAIN 5
-#define GOSSIP_SENDER_SEC_BATTLEINFO 6
-#define GOSSIP_SENDER_SEC_BANK 7
-#define GOSSIP_SENDER_SEC_INN 8
-#define GOSSIP_SENDER_SEC_MAILBOX 9
-#define GOSSIP_SENDER_SEC_STABLEMASTER 10
-
-#define DEFAULT_GOSSIP_MESSAGE 0xffffff
+ GOSSIP_ACTION_TRADE = 1,
+ GOSSIP_ACTION_TRAIN = 2,
+ GOSSIP_ACTION_TAXI = 3,
+ GOSSIP_ACTION_GUILD = 4,
+ GOSSIP_ACTION_BATTLE = 5,
+ GOSSIP_ACTION_BANK = 6,
+ GOSSIP_ACTION_INN = 7,
+ GOSSIP_ACTION_HEAL = 8,
+ GOSSIP_ACTION_TABARD = 9,
+ GOSSIP_ACTION_AUCTION = 10,
+ GOSSIP_ACTION_INN_INFO = 11,
+ GOSSIP_ACTION_UNLEARN = 12,
+ GOSSIP_ACTION_INFO_DEF = 1000,
+
+ GOSSIP_SENDER_MAIN = 1,
+ GOSSIP_SENDER_INN_INFO = 2,
+ GOSSIP_SENDER_INFO = 3,
+ GOSSIP_SENDER_SEC_PROFTRAIN = 4,
+ GOSSIP_SENDER_SEC_CLASSTRAIN = 5,
+ GOSSIP_SENDER_SEC_BATTLEINFO = 6,
+ GOSSIP_SENDER_SEC_BANK = 7,
+ GOSSIP_SENDER_SEC_INN = 8,
+ GOSSIP_SENDER_SEC_MAILBOX = 9,
+ GOSSIP_SENDER_SEC_STABLEMASTER = 10
+};
extern uint32 GetSkillLevel(Player *player,uint32 skill);
diff --git a/src/bindings/scripts/scripts/item/item_scripts.cpp b/src/bindings/scripts/scripts/item/item_scripts.cpp
index 3b72aab6529..10c3069e1dc 100644
--- a/src/bindings/scripts/scripts/item/item_scripts.cpp
+++ b/src/bindings/scripts/scripts/item/item_scripts.cpp
@@ -22,54 +22,24 @@ SDCategory: Items
EndScriptData */
/* ContentData
-item_area_52_special(i28132) Prevents abuse of this item
-item_attuned_crystal_cores(i34368) Prevent abuse(quest 11524 & 11525)
-item_blackwhelp_net(i31129) Quest Whelps of the Wyrmcult (q10747). Prevents abuse
-item_dart_gun Prevent quest provided item instakill anything but the expected
item_draenei_fishing_net(i23654) Hacklike implements chance to spawn item or creature
-item_disciplinary_rod Prevents abuse
item_nether_wraith_beacon(i31742) Summons creatures for quest Becoming a Spellfire Tailor (q10832)
item_flying_machine(i34060,i34061) Engineering crafted flying machines
item_gor_dreks_ointment(i30175) Protecting Our Own(q10488)
-item_muiseks_vessel Cast on creature, they must be dead(q 3123,3124,3125,3126,3127)
item_only_for_flight Items which should only useable while flying
-item_protovoltaic_magneto_collector Prevents abuse
-item_razorthorn_flayer_gland Quest Discovering Your Roots (q11520) and Rediscovering Your Roots (q11521). Prevents abuse
-item_tame_beast_rods(many) Prevent cast on any other creature than the intended (for all tame beast quests)
-item_soul_cannon(i32825) Prevents abuse of this item
-item_sparrowhawk_net(i32321) Quest To Catch A Sparrowhawk (q10987). Prevents abuse
-item_voodoo_charm Provide proper error message and target(q2561)
-item_vorenthals_presence(i30259) Prevents abuse of this item
-item_yehkinyas_bramble(i10699) Allow cast spell on vale screecher only and remove corpse if cast sucessful (q3520)
-item_zezzak_shard(i31463) Quest The eyes of Grillok (q10813). Prevents abuse
-item_inoculating_crystal Quest Inoculating. Prevent abuse
EndContentData */
#include "precompiled.h"
-#include "SpellMgr.h"
#include "Spell.h"
-#include "WorldPacket.h"
/*#####
-# item_area_52_special
+# item_only_for_flight
#####*/
-bool ItemUse_item_area_52_special(Player *player, Item* _Item, SpellCastTargets const& targets)
+enum
{
- if ( player->GetAreaId() == 3803 )
- {
- return false;
- }
- else
- {
- player->SendEquipError(EQUIP_ERR_OUT_OF_RANGE,_Item,NULL);
- return true;
- }
-}
-
-/*#####
-# item_only_for_flight
-#####*/
+ SPELL_ARCANE_CHARGES = 45072
+};
bool ItemUse_item_only_for_flight(Player *player, Item* _Item, SpellCastTargets const& targets)
{
@@ -87,6 +57,10 @@ bool ItemUse_item_only_for_flight(Player *player, Item* _Item, SpellCastTargets
if(player->GetZoneId() != 4080)
disabled = true;
break;
+ case 34475:
+ if (const SpellEntry* pSpellInfo = GetSpellStore()->LookupEntry(SPELL_ARCANE_CHARGES))
+ Spell::SendCastResult(player, pSpellInfo, 1, SPELL_FAILED_NOT_ON_GROUND);
+ break;
}
// allow use in flight only
@@ -99,57 +73,6 @@ bool ItemUse_item_only_for_flight(Player *player, Item* _Item, SpellCastTargets
}
/*#####
-# item_attuned_crystal_cores
-#####*/
-
-bool ItemUse_item_attuned_crystal_cores(Player *player, Item* _Item, SpellCastTargets const& targets)
-{
- if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
- targets.getUnitTarget()->GetEntry() == 24972 && targets.getUnitTarget()->isDead() &&
- (player->GetQuestStatus(11524) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(11525) == QUEST_STATUS_INCOMPLETE) )
- {
- CAST_CRE(targets.getUnitTarget())->RemoveCorpse();
- return false;
- }
-
- player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,_Item,NULL);
- return true;
-}
-
-/*#####
-# item_blackwhelp_net
-#####*/
-
-bool ItemUse_item_blackwhelp_net(Player *player, Item* _Item, SpellCastTargets const& targets)
-{
- if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
- targets.getUnitTarget()->GetEntry() == 21387 )
- return false;
-
- player->SendEquipError(EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM,_Item,NULL);
- return true;
-}
-
-/*#####
-# item_dart_gun
-#####*/
-
-enum
-{
- NPC_HAMMER_SCOUT = 32201
-};
-
-bool ItemUse_item_dart_gun(Player* pPlayer, Item* pItem, const SpellCastTargets &pTargets)
-{
- if (pTargets.getUnitTarget() && pTargets.getUnitTarget()->GetTypeId() == TYPEID_UNIT &&
- pTargets.getUnitTarget()->GetEntry() == NPC_HAMMER_SCOUT)
- return false;
-
- pPlayer->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
- return true;
-}
-
-/*#####
# item_draenei_fishing_net
#####*/
@@ -186,20 +109,6 @@ bool ItemUse_item_draenei_fishing_net(Player *player, Item* _Item, SpellCastTarg
}
/*#####
-# item_disciplinary_rod
-#####*/
-
-bool ItemUse_item_disciplinary_rod(Player *player, Item* _Item, SpellCastTargets const& targets)
-{
- if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
- (targets.getUnitTarget()->GetEntry() == 15941 || targets.getUnitTarget()->GetEntry() == 15945) )
- return false;
-
- player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,_Item,NULL);
- return true;
-}
-
-/*#####
# item_nether_wraith_beacon
#####*/
@@ -251,265 +160,6 @@ bool ItemUse_item_gor_dreks_ointment(Player *player, Item* _Item, SpellCastTarge
}
/*#####
-# item_muiseks_vessel
-#####*/
-
-bool ItemUse_item_muiseks_vessel(Player *player, Item* _Item, SpellCastTargets const& targets)
-{
- Unit* uTarget = targets.getUnitTarget();
- uint32 itemSpell = _Item->GetProto()->Spells[0].SpellId;
- uint32 cEntry = 0;
- uint32 cEntry2 = 0;
- uint32 cEntry3 = 0;
- uint32 cEntry4 = 0;
-
- if(itemSpell)
- {
- switch(itemSpell)
- {
- case 11885: //Wandering Forest Walker
- cEntry = 7584;
- break;
- case 11886: //Owlbeasts
- cEntry = 2927;
- cEntry2 = 2928;
- cEntry3 = 2929;
- cEntry4 = 7808;
- break;
- case 11887: //Freyfeather Hippogryphs
- cEntry = 5300;
- cEntry2 = 5304;
- cEntry3 = 5305;
- cEntry4 = 5306;
- break;
- case 11888: //Sprite Dragon Sprite Darters
- cEntry = 5276;
- cEntry2 = 5278;
- break;
- case 11889: //Zapped Land Walker Land Walker Zapped Cliff Giant Cliff Giant
- cEntry = 5357;
- cEntry2 = 5358;
- cEntry3 = 14640;
- cEntry4 = 14604;
- break;
- }
- if( uTarget && uTarget->GetTypeId()==TYPEID_UNIT && uTarget->isDead() &&
- (uTarget->GetEntry()==cEntry || uTarget->GetEntry()==cEntry2 || uTarget->GetEntry()==cEntry3 || uTarget->GetEntry()==cEntry4) )
- {
- CAST_CRE(uTarget)->RemoveCorpse();
- return false;
- }
- }
-
- WorldPacket data(SMSG_CAST_FAILED, (4+2)); // prepare packet error message
- data << uint32(_Item->GetEntry()); // itemId
- data << uint8(SPELL_FAILED_BAD_TARGETS); // reason
- player->GetSession()->SendPacket(&data); // send message: Invalid target
-
- player->SendEquipError(EQUIP_ERR_NONE,_Item,NULL); // break spell
- return true;
-}
-
-/*#####
-# item_inoculating_crystal
-#####*/
-
-bool ItemUse_item_inoculating_crystal(Player *player, Item* _Item, SpellCastTargets const& targets)
-{
- if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
- targets.getUnitTarget()->GetEntry() == 16518 )
- return false;
-
- WorldPacket data(SMSG_CAST_FAILED, (4+2)); // prepare packet error message
- data << uint32(_Item->GetEntry()); // itemId
- data << uint8(SPELL_FAILED_BAD_TARGETS); // reason
- player->GetSession()->SendPacket(&data); // send message: Invalid target
-
- player->SendEquipError(EQUIP_ERR_NONE,_Item,NULL); // break spell
- return true;
-}
-
-/*#####
-# item_razorthorn_flayer_gland
-#####*/
-
-bool ItemUse_item_razorthorn_flayer_gland(Player *player, Item* _Item, SpellCastTargets const& targets)
-{
- if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
- targets.getUnitTarget()->GetEntry() == 24922 )
- return false;
-
- player->SendEquipError(EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM,_Item,NULL);
- return true;
-}
-
-/*#####
-# item_tame_beast_rods
-#####*/
-
-bool ItemUse_item_tame_beast_rods(Player *player, Item* _Item, SpellCastTargets const& targets)
-{
- uint32 itemSpell = _Item->GetProto()->Spells[0].SpellId;
- uint32 cEntry = 0;
-
- if(itemSpell)
- {
- switch(itemSpell)
- {
- case 19548: cEntry = 1196; break; //Ice Claw Bear
- case 19674: cEntry = 1126; break; //Large Crag Boar
- case 19687: cEntry = 1201; break; //Snow Leopard
- case 19688: cEntry = 2956; break; //Adult Plainstrider
- case 19689: cEntry = 2959; break; //Prairie Stalker
- case 19692: cEntry = 2970; break; //Swoop
- case 19693: cEntry = 1998; break; //Webwood Lurker
- case 19694: cEntry = 3099; break; //Dire Mottled Boar
- case 19696: cEntry = 3107; break; //Surf Crawler
- case 19697: cEntry = 3126; break; //Armored Scorpid
- case 19699: cEntry = 2043; break; //Nightsaber Stalker
- case 19700: cEntry = 1996; break; //Strigid Screecher
- case 30646: cEntry = 17217; break; //Barbed Crawler
- case 30653: cEntry = 17374; break; //Greater Timberstrider
- case 30654: cEntry = 17203; break; //Nightstalker
- case 30099: cEntry = 15650; break; //Crazed Dragonhawk
- case 30102: cEntry = 15652; break; //Elder Springpaw
- case 30105: cEntry = 16353; break; //Mistbat
- }
- if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
- targets.getUnitTarget()->GetEntry() == cEntry )
- return false;
- }
-
- WorldPacket data(SMSG_CAST_FAILED, (4+2)); // prepare packet error message
- data << uint32(_Item->GetEntry()); // itemId
- data << uint8(SPELL_FAILED_BAD_TARGETS); // reason
- player->GetSession()->SendPacket(&data); // send message: Invalid target
-
- player->SendEquipError(EQUIP_ERR_NONE,_Item,NULL); // break spell
- return true;
-}
-
-/*#####
-# item_protovoltaic_magneto_collector
-#####*/
-
-bool ItemUse_item_protovoltaic_magneto_collector(Player *player, Item* _Item, SpellCastTargets const& targets)
-{
- if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
- targets.getUnitTarget()->GetEntry() == 21729 )
- return false;
-
- player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW,_Item,NULL);
- return true;
-}
-
-/*#####
-# item_soul_cannon
-#####*/
-
-bool ItemUse_item_soul_cannon(Player *player, Item* _Item, SpellCastTargets const& targets)
-{
- // allow use
- if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
- targets.getUnitTarget()->GetEntry() == 22357 )
- return false;
-
- // error
- player->SendEquipError(EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM,_Item,NULL);
- return true;
-}
-
-/*#####
-# item_sparrowhawk_net
-#####*/
-
-bool ItemUse_item_sparrowhawk_net(Player *player, Item* _Item, SpellCastTargets const& targets)
-{
- if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
- targets.getUnitTarget()->GetEntry() == 22979 )
- return false;
-
- player->SendEquipError(EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM,_Item,NULL);
- return true;
-}
-
-/*#####
-# item_voodoo_charm
-#####*/
-
-bool ItemUse_item_voodoo_charm(Player *player, Item* _Item, SpellCastTargets const& targets)
-{
- if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT && targets.getUnitTarget()->isDead() &&
- targets.getUnitTarget()->GetEntry()==7318 )
- return false;
-
- WorldPacket data(SMSG_CAST_FAILED, (4+2)); // prepare packet error message
- data << uint32(_Item->GetEntry()); // itemId
- data << uint8(SPELL_FAILED_BAD_TARGETS); // reason
- player->GetSession()->SendPacket(&data); // send message: Invalid target
-
- player->SendEquipError(EQUIP_ERR_NONE,_Item,NULL); // break spell
- return true;
-}
-
-/*#####
-# item_vorenthals_presence
-#####*/
-
-bool ItemUse_item_vorenthals_presence(Player *player, Item* _Item, SpellCastTargets const& targets)
-{
- // allow use
- if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
- targets.getUnitTarget()->GetEntry() == 20132 )
- return false;
-
- // error
- player->SendEquipError(EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM,_Item,NULL);
- return true;
-}
-
-/*#####
-# item_yehkinyas_bramble
-#####*/
-
-bool ItemUse_item_yehkinyas_bramble(Player *player, Item* _Item, SpellCastTargets const& targets)
-{
- if (player->GetQuestStatus(3520) == QUEST_STATUS_INCOMPLETE)
- {
- Unit * unit_target = targets.getUnitTarget();
- if( unit_target &&
- unit_target->GetTypeId()==TYPEID_UNIT &&
- unit_target->isDead() &&
- // cast only on corpse 5307 or 5308
- (unit_target->GetEntry()==5307 || unit_target->GetEntry()==5308) )
- {
- CAST_CRE(unit_target)->RemoveCorpse(); // remove corpse for cancelling second use
- return false; // all ok
- }
- }
- WorldPacket data(SMSG_CAST_FAILED, (4+2)); // prepare packet error message
- data << uint32(10699); // itemId
- data << uint8(SPELL_FAILED_BAD_TARGETS); // reason
- player->GetSession()->SendPacket(&data); // send message: Bad target
- player->SendEquipError(EQUIP_ERR_NONE,_Item,NULL); // break spell
- return true;
-}
-
-/*#####
-# item_zezzak_shard
-#####*/
-
-bool ItemUse_item_zezzak_shard(Player *player, Item* _Item, SpellCastTargets const& targets)
-{
- if( targets.getUnitTarget() && targets.getUnitTarget()->GetTypeId()==TYPEID_UNIT &&
- targets.getUnitTarget()->GetEntry() == 19440 )
- return false;
-
- player->SendEquipError(EQUIP_ERR_YOU_CAN_NEVER_USE_THAT_ITEM,_Item,NULL);
- return true;
-}
-
-/*#####
# item_incendiary_explosives
#####*/
@@ -561,36 +211,11 @@ void AddSC_item_scripts()
Script *newscript;
newscript = new Script;
- newscript->Name="item_area_52_special";
- newscript->pItemUse = &ItemUse_item_area_52_special;
- newscript->RegisterSelf();
-
- newscript = new Script;
newscript->Name="item_only_for_flight";
newscript->pItemUse = &ItemUse_item_only_for_flight;
newscript->RegisterSelf();
newscript = new Script;
- newscript->Name="item_attuned_crystal_cores";
- newscript->pItemUse = &ItemUse_item_attuned_crystal_cores;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="item_blackwhelp_net";
- newscript->pItemUse = &ItemUse_item_blackwhelp_net;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name = "item_dart_gun";
- newscript->pItemUse = &ItemUse_item_dart_gun;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="item_disciplinary_rod";
- newscript->pItemUse = &ItemUse_item_disciplinary_rod;
- newscript->RegisterSelf();
-
- newscript = new Script;
newscript->Name="item_draenei_fishing_net";
newscript->pItemUse = &ItemUse_item_draenei_fishing_net;
newscript->RegisterSelf();
@@ -611,61 +236,6 @@ void AddSC_item_scripts()
newscript->RegisterSelf();
newscript = new Script;
- newscript->Name="item_muiseks_vessel";
- newscript->pItemUse = &ItemUse_item_muiseks_vessel;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="item_inoculating_crystal";
- newscript->pItemUse = &ItemUse_item_inoculating_crystal;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="item_razorthorn_flayer_gland";
- newscript->pItemUse = &ItemUse_item_razorthorn_flayer_gland;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="item_tame_beast_rods";
- newscript->pItemUse = &ItemUse_item_tame_beast_rods;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="item_protovoltaic_magneto_collector";
- newscript->pItemUse = &ItemUse_item_protovoltaic_magneto_collector;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="item_soul_cannon";
- newscript->pItemUse = &ItemUse_item_soul_cannon;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="item_sparrowhawk_net";
- newscript->pItemUse = &ItemUse_item_sparrowhawk_net;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="item_voodoo_charm";
- newscript->pItemUse = &ItemUse_item_voodoo_charm;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="item_vorenthals_presence";
- newscript->pItemUse = &ItemUse_item_vorenthals_presence;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="item_yehkinyas_bramble";
- newscript->pItemUse = &ItemUse_item_yehkinyas_bramble;
- newscript->RegisterSelf();
-
- newscript = new Script;
- newscript->Name="item_zezzaks_shard";
- newscript->pItemUse = &ItemUse_item_zezzak_shard;
- newscript->RegisterSelf();
-
- newscript = new Script;
newscript->Name="item_incendiary_explosives";
newscript->pItemUse = &ItemUse_item_incendiary_explosives;
newscript->RegisterSelf();
diff --git a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp
index 378f8163f9d..0e0639fa14a 100644
--- a/src/bindings/scripts/scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp
+++ b/src/bindings/scripts/scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp
@@ -47,6 +47,7 @@ struct TRINITY_DLL_DECL boss_draganthaurissanAI : public ScriptedAI
void EnterCombat(Unit *who)
{
DoScriptText(SAY_AGGRO, m_creature);
+ m_creature->CallForHelp(VISIBLE_RANGE);
}
void KilledUnit(Unit* victim)
diff --git a/src/bindings/scripts/scripts/zone/magisters_terrace/magisters_terrace.cpp b/src/bindings/scripts/scripts/zone/magisters_terrace/magisters_terrace.cpp
index 18694fe15e6..d9b33bbf4fc 100644
--- a/src/bindings/scripts/scripts/zone/magisters_terrace/magisters_terrace.cpp
+++ b/src/bindings/scripts/scripts/zone/magisters_terrace/magisters_terrace.cpp
@@ -34,6 +34,7 @@ EndContentData */
enum
{
SPELL_TRANSFORM_TO_KAEL = 44670,
+ SPELL_ORB_KILL_CREDIT = 46307,
NPC_KAEL = 24848, //human form entry
POINT_ID_LAND = 1
};
@@ -72,12 +73,40 @@ struct TRINITY_DLL_DECL npc_kalecgosAI : public ScriptedAI
m_uiTransformTimer = MINUTE*IN_MILISECONDS;
}
+ // some targeting issues with the spell, so use this workaround as temporary solution
+ void DoWorkaroundForQuestCredit()
+ {
+ Map* pMap = m_creature->GetMap();
+
+ if (!pMap || pMap->IsHeroic())
+ return;
+
+ Map::PlayerList const &lList = pMap->GetPlayers();
+
+ if (lList.isEmpty())
+ return;
+
+ SpellEntry const* pSpell = GetSpellStore()->LookupEntry(SPELL_ORB_KILL_CREDIT);
+
+ for(Map::PlayerList::const_iterator i = lList.begin(); i != lList.end(); ++i)
+ {
+ if (Player* pPlayer = i->getSource())
+ {
+ if (pSpell && pSpell->EffectMiscValue[0])
+ pPlayer->KilledMonsterCredit(pSpell->EffectMiscValue[0], 0);
+ }
+ }
+ }
+
void UpdateAI(const uint32 uiDiff)
{
if (m_uiTransformTimer)
{
if (m_uiTransformTimer < uiDiff)
{
+ m_creature->CastSpell(m_creature,SPELL_ORB_KILL_CREDIT,false);
+ DoWorkaroundForQuestCredit();
+
// Transform and update entry, now ready for quest/read gossip
m_creature->CastSpell(m_creature,SPELL_TRANSFORM_TO_KAEL,false);
m_creature->UpdateEntry(NPC_KAEL);
diff --git a/src/bindings/scripts/scripts/zone/nexus/nexus/boss_anomalus.cpp b/src/bindings/scripts/scripts/zone/nexus/nexus/boss_anomalus.cpp
index cf16afba616..e5fda84fa95 100644
--- a/src/bindings/scripts/scripts/zone/nexus/nexus/boss_anomalus.cpp
+++ b/src/bindings/scripts/scripts/zone/nexus/nexus/boss_anomalus.cpp
@@ -24,25 +24,28 @@ EndScriptData */
#include "precompiled.h"
#include "def_nexus.h"
+enum
+{
//Spells
-#define SPELL_SPARK_N 47751
-#define SPELL_SPARK_H 57062
-#define SPELL_RIFT_SHIELD 47748
-#define SPELL_CHARGE_RIFT 47747 //Works wrong (affect players, not rifts)
-#define SPELL_CREATE_RIFT 47743 //Don't work, using WA
-#define SPELL_ARCANE_ATTRACTION 57063 //No idea, when it's used
-
-#define MOB_CRAZED_MANA_WRAITH 26746
-#define MOB_CHAOTIC_RIFT 26918
-#define SPELL_CHAOTIC_ENERGY_BURST 47688
-#define SPELL_CHARGED_CHAOTIC_ENERGY_BURST 47737
-#define SPELL_ARCANEFORM 48019 //Chaotic Rift visual
+ SPELL_SPARK_N = 47751,
+ SPELL_SPARK_H = 57062,
+ SPELL_RIFT_SHIELD = 47748,
+ SPELL_CHARGE_RIFT = 47747, //Works wrong (affect players, not rifts)
+ SPELL_CREATE_RIFT = 47743, //Don't work, using WA
+ SPELL_ARCANE_ATTRACTION = 57063, //No idea, when it's used
+
+ MOB_CRAZED_MANA_WRAITH = 26746,
+ MOB_CHAOTIC_RIFT = 26918,
+ SPELL_CHAOTIC_ENERGY_BURST = 47688,
+ SPELL_CHARGED_CHAOTIC_ENERGY_BURST = 47737,
+ SPELL_ARCANEFORM = 48019, //Chaotic Rift visual
//Yell
-#define SAY_AGGRO -1576010
-#define SAY_DEATH -1576011
-#define SAY_RIFT -1576012
-#define SAY_SHIELD -1576013
+ SAY_AGGRO = -1576010,
+ SAY_DEATH = -1576011,
+ SAY_RIFT = -1576012,
+ SAY_SHIELD = -1576013
+};
float RiftLocation[6][3]=
{
diff --git a/src/bindings/scripts/scripts/zone/nexus/nexus/boss_keristrasza.cpp b/src/bindings/scripts/scripts/zone/nexus/nexus/boss_keristrasza.cpp
index 02bcebb7b49..6bba503e777 100644
--- a/src/bindings/scripts/scripts/zone/nexus/nexus/boss_keristrasza.cpp
+++ b/src/bindings/scripts/scripts/zone/nexus/nexus/boss_keristrasza.cpp
@@ -24,22 +24,25 @@ EndScriptData */
#include "precompiled.h"
#include "def_nexus.h"
+enum
+{
//Spells
-#define SPELL_FROZEN_PRISON 47854
-#define SPELL_TAIL_SWEEP 50155
-#define SPELL_CRYSTAL_CHAINS 50997
-#define SPELL_ENRAGE 8599
-#define SPELL_CRYSTALFIRE_BREATH_N 48096
-#define SPELL_CRYSTALFIRE_BREATH_H 57091
-#define SPELL_CRYSTALIZE 48179
-#define SPELL_INTENSE_COLD 48094
+ SPELL_FROZEN_PRISON = 47854,
+ SPELL_TAIL_SWEEP = 50155,
+ SPELL_CRYSTAL_CHAINS = 50997,
+ SPELL_ENRAGE = 8599,
+ SPELL_CRYSTALFIRE_BREATH_N = 48096,
+ SPELL_CRYSTALFIRE_BREATH_H = 57091,
+ SPELL_CRYSTALIZE = 48179,
+ SPELL_INTENSE_COLD = 48094,
//Yell
-#define SAY_AGGRO -1576040
-#define SAY_SLAY -1576041
-#define SAY_ENRAGE -1576042
-#define SAY_DEATH -1576043
-#define SAY_CRYSTAL_NOVA -1576044
+ SAY_AGGRO = -1576040,
+ SAY_SLAY = -1576041,
+ SAY_ENRAGE = -1576042,
+ SAY_DEATH = -1576043,
+ SAY_CRYSTAL_NOVA = -1576044
+};
struct TRINITY_DLL_DECL boss_keristraszaAI : public ScriptedAI
{
diff --git a/src/bindings/scripts/scripts/zone/nexus/nexus/boss_magus_telestra.cpp b/src/bindings/scripts/scripts/zone/nexus/nexus/boss_magus_telestra.cpp
index 24482bf837a..5bce7c4c7e3 100644
--- a/src/bindings/scripts/scripts/zone/nexus/nexus/boss_magus_telestra.cpp
+++ b/src/bindings/scripts/scripts/zone/nexus/nexus/boss_magus_telestra.cpp
@@ -24,37 +24,38 @@ EndScriptData */
#include "precompiled.h"
#include "def_nexus.h"
-//Spells
-
-#define SPELL_ICE_NOVA_N 47772
-#define SPELL_ICE_NOVA_H 56935
-#define SPELL_FIREBOMB_N 47773
-#define SPELL_FIREBOMB_H 56934
-#define SPELL_GRAVITY_WELL 47756
-#define SPELL_TELESTRA_BACK 47714
-
-float CenterOfRoom[1][4] =
+enum
{
- {504.80, 89.07, -16.12, 6.27}
-};
+//Spells
+ SPELL_ICE_NOVA_N = 47772,
+ SPELL_ICE_NOVA_H = 56935,
+ SPELL_FIREBOMB_N = 47773,
+ SPELL_FIREBOMB_H = 56934,
+ SPELL_GRAVITY_WELL = 47756,
+ SPELL_TELESTRA_BACK = 47714,
//At 50% HP - 3 clones, Frost, Fire, Arcane (and in 10% HP in Heroic)
-#define MOB_FIRE_MAGUS 26928
-#define MOB_FROST_MAGUS 26930
-#define MOB_ARCANE_MAGUS 26929
+ MOB_FIRE_MAGUS = 26928,
+ MOB_FROST_MAGUS = 26930,
+ MOB_ARCANE_MAGUS = 26929,
-#define SPELL_FIRE_MAGUS_VISUAL 47705
-#define SPELL_FROST_MAGUS_VISUAL 47706
-#define SPELL_ARCANE_MAGUS_VISUAL 47704
+ SPELL_FIRE_MAGUS_VISUAL = 47705,
+ SPELL_FROST_MAGUS_VISUAL = 47706,
+ SPELL_ARCANE_MAGUS_VISUAL = 47704,
//Yell
-#define SAY_AGGRO -1576000
-#define SAY_KILL -1576001
-#define SAY_DEATH -1576002
-#define SAY_MERGE -1576003
-#define SAY_SPLIT_1 -1576004
-#define SAY_SPLIT_2 -1576005
+ SAY_AGGRO = -1576000,
+ SAY_KILL = -1576001,
+ SAY_DEATH = -1576002,
+ SAY_MERGE = -1576003,
+ SAY_SPLIT_1 = -1576004,
+ SAY_SPLIT_2 = -1576005
+};
+float CenterOfRoom[1][4] =
+{
+ {504.80, 89.07, -16.12, 6.27}
+};
struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
{
diff --git a/src/bindings/scripts/scripts/zone/nexus/nexus/boss_ormorok.cpp b/src/bindings/scripts/scripts/zone/nexus/nexus/boss_ormorok.cpp
index db9bf2317bb..1cda12197a2 100644
--- a/src/bindings/scripts/scripts/zone/nexus/nexus/boss_ormorok.cpp
+++ b/src/bindings/scripts/scripts/zone/nexus/nexus/boss_ormorok.cpp
@@ -24,29 +24,32 @@ EndScriptData */
#include "precompiled.h"
#include "def_nexus.h"
+enum
+{
//Spells
-#define SPELL_CRYSTAL_SPIKES_N 47958 //Don't work, using walkaround
-#define SPELL_CRYSTAL_SPIKES_H 57082 //Don't work, using walkaround
+ SPELL_CRYSTAL_SPIKES_N = 47958, //Don't work, using walkaround
+ SPELL_CRYSTAL_SPIKES_H = 57082, //Don't work, using walkaround
//Walkaround for spells Crystal Spikes -----------------
-#define SPELL_CRYSTALL_SPIKE_DAMAGE_N 47944
-#define SPELL_CRYSTALL_SPIKE_DAMAGE_H 57067
-#define SPELL_CRYSTAL_SPIKE_PREVISUAL 50442
-#define MOB_CRYSTAL_SPIKE 27099
+ SPELL_CRYSTALL_SPIKE_DAMAGE_N = 47944,
+ SPELL_CRYSTALL_SPIKE_DAMAGE_H = 57067,
+ SPELL_CRYSTAL_SPIKE_PREVISUAL = 50442,
+ MOB_CRYSTAL_SPIKE = 27099,
//------------------------------------------------------
-#define SPELL_SPELL_REFLECTION 47981
-#define SPELL_TRAMPLE_N 48016
-#define SPELL_TRAMPLE_H 57066
-#define SPELL_FRENZY 48017
-#define SPELL_SUMMON_CRYSTALLINE_TANGLER 61564 //summons npc 32665
-#define MOB_CRYSTALLINE_TANGLER 32665
-#define SPELL_ROOTS 28858 //proper spell id is unknown
+ SPELL_SPELL_REFLECTION = 47981,
+ SPELL_TRAMPLE_N = 48016,
+ SPELL_TRAMPLE_H = 57066,
+ SPELL_FRENZY = 48017,
+ SPELL_SUMMON_CRYSTALLINE_TANGLER = 61564, //summons npc 32665
+ MOB_CRYSTALLINE_TANGLER = 32665,
+ SPELL_ROOTS = 28858, //proper spell id is unknown
//Yell
-#define SAY_AGGRO -1576020
-#define SAY_DEATH -1576021
-#define SAY_REFLECT -1576022
-#define SAY_CRYSTAL_SPIKES -1576023
-#define SAY_KILL -1576024
+ SAY_AGGRO = -1576020,
+ SAY_DEATH = -1576021,
+ SAY_REFLECT = -1576022,
+ SAY_CRYSTAL_SPIKES = -1576023,
+ SAY_KILL = -1576024
+};
#define SPIKE_DISTANCE 5.0f
diff --git a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_mograine_and_whitemane.cpp b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_mograine_and_whitemane.cpp
index 85f74cf2a9b..c4d062bdfcd 100644
--- a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_mograine_and_whitemane.cpp
+++ b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_mograine_and_whitemane.cpp
@@ -99,6 +99,8 @@ struct TRINITY_DLL_DECL boss_scarlet_commander_mograineAI : public ScriptedAI
{
DoScriptText(SAY_MO_AGGRO, m_creature);
DoCast(m_creature,SPELL_RETRIBUTIONAURA);
+
+ m_creature->CallForHelp(VISIBLE_RANGE);
}
void KilledUnit(Unit* pVictim)
@@ -235,6 +237,14 @@ struct TRINITY_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI
m_pInstance->SetData(TYPE_MOGRAINE_AND_WHITE_EVENT, NOT_STARTED);
}
+ void AttackStart(Unit* pWho)
+ {
+ if (m_pInstance && m_pInstance->GetData(TYPE_MOGRAINE_AND_WHITE_EVENT) == NOT_STARTED)
+ return;
+
+ ScriptedAI::AttackStart(pWho);
+ }
+
void EnterCombat(Unit* pWho)
{
DoScriptText(SAY_WH_INTRO, m_creature);
@@ -286,14 +296,14 @@ struct TRINITY_DLL_DECL boss_high_inquisitor_whitemaneAI : public ScriptedAI
{
Creature* pTarget = NULL;
- if (!m_creature->HasAuraState(AURA_STATE_HEALTH_ABOVE_75_PERCENT))
+ if (m_creature->GetHealth() <= m_creature->GetMaxHealth()*0.75f)
pTarget = m_creature;
if (m_pInstance)
{
if (Creature* pMograine = (Creature*)Unit::GetUnit((*m_creature), m_pInstance->GetData64(DATA_MOGRAINE)))
{
- if (pMograine->isAlive() && !pMograine->HasAuraState(AURA_STATE_HEALTH_ABOVE_75_PERCENT))
+ if (pMograine->isAlive() && pMograine->GetHealth() <= pMograine->GetMaxHealth()*0.75f)
pTarget = pMograine;
}
}