Changeset 117
- Timestamp:
- 11/19/08 13:37:48 (17 years ago)
- Location:
- trunk/src/bindings/scripts
- Files:
-
- 1 added
- 10 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp
r109 r117 211 211 Channeler->Respawn(); 212 212 } 213 if(m_creature->isAlive()) 214 { 213 215 Channeler->CastSpell(m_creature, SPELL_SHADE_SOUL_CHANNEL, true); 214 216 Channeler->CastSpell(m_creature, SPELL_SHADE_SOUL_CHANNEL_2, true); 215 217 Channeler->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); 218 } 216 219 } 217 220 } … … 389 392 // They move towards AKama 390 393 Defender->GetMotionMaster()->MovePoint(0, x, y, z); 394 Defender->AI()->AttackStart(Akama); 391 395 }else move = false; 392 396 }else move = false; -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
r109 r117 80 80 #define COILFANG_STRIDER 22056 81 81 #define COILFANG_ELITE 22055 82 #define FATHOM_SPOREBAT 2214082 #define TOXIC_SPOREBAT 22140 83 83 84 84 float ElementPos[8][4] = … … 128 128 129 129 uint64 ShieldGeneratorChannel[4]; 130 uint64 AggroTargetGUID; 130 131 131 132 uint32 ShockBlast_Timer; … … 140 141 uint32 SummonSporebat_Timer; 141 142 uint32 SummonSporebat_StaticTimer; 143 uint32 AggroTimer; 144 142 145 uint8 EnchantedElemental_Pos; 143 146 uint8 Phase; 144 147 145 148 bool Entangle; 149 bool Intro; 146 150 147 151 void Reset() … … 160 164 EnchantedElemental_Pos = 0; 161 165 Phase = 0; 166 AggroTimer = 19000; 167 AggroTargetGUID = 0; 168 169 m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); 170 // Start off unattackable so that the intro is done properly 171 m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); 162 172 163 173 Entangle = false; 174 Intro = false; 164 175 165 176 if(pInstance) 166 pInstance->SetData(DATA_LADYVASHJEVENT, 0);177 pInstance->SetData(DATA_LADYVASHJEVENT, NOT_STARTED); 167 178 168 179 ShieldGeneratorChannel[0] = 0; … … 170 181 ShieldGeneratorChannel[2] = 0; 171 182 ShieldGeneratorChannel[3] = 0; 172 173 183 } 174 184 … … 179 189 if(TaintedElemental_Timer > 50000) 180 190 TaintedElemental_Timer = 50000; 191 } 192 193 void MoveInLineOfSight(Unit *who) 194 { 195 if(!who || (!who->isAlive())) return; 196 197 if(who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who)) 198 { 199 float attackRadius = m_creature->GetAttackDistance(who); 200 201 if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE && m_creature->IsWithinLOSInMap(who)) 202 { 203 if(who->HasStealthAura()) 204 who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); 205 206 m_creature->AddThreat(who, 1.0f); 207 } 208 209 if(!InCombat && !Intro && m_creature->IsWithinDistInMap(who, 40.0f) && (who->GetTypeId() == TYPEID_PLAYER)) 210 { 211 if(pInstance) 212 pInstance->SetData(DATA_LADYVASHJEVENT, IN_PROGRESS); 213 214 m_creature->GetMotionMaster()->Clear(false); 215 m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); 216 DoYell(SAY_INTRO,LANG_UNIVERSAL,NULL); 217 DoPlaySoundToSet(m_creature, SOUND_INTRO); 218 m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK); 219 AggroTargetGUID = who->GetGUID(); 220 Intro = true; 221 } 222 } 181 223 } 182 224 … … 203 245 204 246 if(pInstance) 205 pInstance->SetData(DATA_LADYVASHJEVENT, 0);206 } 207 208 void StartEvent()247 pInstance->SetData(DATA_LADYVASHJEVENT, DONE); 248 } 249 250 /* void StartEvent() 209 251 { 210 252 switch(rand()%4) … … 231 273 232 274 if(pInstance) 233 pInstance->SetData(DATA_LADYVASHJEVENT, 1); 234 } 235 236 void Aggro(Unit *who) 237 { 238 //Begin melee attack if we are within range 239 if(Phase != 2) 240 DoStartMovement(who); 241 242 StartEvent(); 243 } 275 pInstance->SetData(DATA_LADYVASHJEVENT, IN_PROGRESS); 276 }*/ 277 278 void Aggro(Unit *who){} 244 279 245 280 void CastShootOrMultishot() … … 279 314 //to prevent abuses during phase 2 280 315 if(Phase == 2 && !m_creature->getVictim() && InCombat) 281 EnterEvadeMode(); 316 { 317 EnterEvadeMode(); 318 return; 319 } 282 320 283 321 //Return since we have no target 284 322 if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) 285 323 return; 324 325 //Intro 326 if(Intro) 327 { 328 if(AggroTimer < diff) 329 { 330 m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); 331 m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); 332 switch(rand()%4) 333 { 334 case 0: 335 DoPlaySoundToSet(m_creature, SOUND_AGGRO1); 336 DoYell(SAY_AGGRO1, LANG_UNIVERSAL, NULL); 337 break; 338 case 1: 339 DoPlaySoundToSet(m_creature, SOUND_AGGRO2); 340 DoYell(SAY_AGGRO2, LANG_UNIVERSAL, NULL); 341 break; 342 case 2: 343 DoPlaySoundToSet(m_creature, SOUND_AGGRO3); 344 DoYell(SAY_AGGRO3, LANG_UNIVERSAL, NULL); 345 break; 346 case 3: 347 DoPlaySoundToSet(m_creature, SOUND_AGGRO4); 348 DoYell(SAY_AGGRO4, LANG_UNIVERSAL, NULL); 349 break; 350 } 351 Phase = 1; 352 m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); 353 Intro = false; 354 //Begin melee attack if we are within range 355 if(AggroTargetGUID && Phase != 2) 356 { 357 Unit* pUnit = Unit::GetUnit((*m_creature), AggroTargetGUID); 358 if(pUnit) 359 { 360 m_creature->GetMotionMaster()->MoveChase(pUnit); 361 AttackStart(pUnit); 362 } 363 DoZoneInCombat(); 364 }else EnterEvadeMode(); 365 }else AggroTimer -= diff; 366 } 286 367 287 368 if(Phase == 1 || Phase == 3) … … 369 450 { 370 451 Creature *Sporebat = NULL; 371 Sporebat = m_creature->SummonCreature( FATHOM_SPOREBAT, SPOREBAT_X, SPOREBAT_Y, SPOREBAT_Z, SPOREBAT_O, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);452 Sporebat = m_creature->SummonCreature(TOXIC_SPOREBAT, SPOREBAT_X, SPOREBAT_Y, SPOREBAT_Z, SPOREBAT_O, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); 372 453 373 454 if(Sporebat) … … 486 567 Creature *CoilfangStrider; 487 568 uint32 pos = rand()%3; 488 CoilfangStrider = m_creature->SummonCreature(COILFANG_STRIDER, CoilfangStriderPos[pos][0], CoilfangStriderPos[pos][1], CoilfangStriderPos[pos][2], CoilfangStriderPos[pos][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);569 CoilfangStrider = m_creature->SummonCreature(COILFANG_STRIDER, CoilfangStriderPos[pos][0], CoilfangStriderPos[pos][1], CoilfangStriderPos[pos][2], CoilfangStriderPos[pos][3], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000); 489 570 if(CoilfangStrider) 490 571 { … … 635 716 }; 636 717 637 // FathomSporebat718 //Toxic Sporebat 638 719 //Toxic Spores: Used in Phase 3 by the Spore Bats, it creates a contaminated green patch of ground, dealing about 2775-3225 nature damage every second to anyone who stands in it. 639 struct TRINITY_DLL_DECL mob_ fathom_sporebatAI : public ScriptedAI640 { 641 mob_ fathom_sporebatAI(Creature *c) : ScriptedAI(c)720 struct TRINITY_DLL_DECL mob_toxic_sporebatAI : public ScriptedAI 721 { 722 mob_toxic_sporebatAI(Creature *c) : ScriptedAI(c) 642 723 { 643 724 pInstance = ((ScriptedInstance*)c->GetInstanceData()); … … 652 733 void Reset() 653 734 { 654 m_creature->setFaction(14); 735 m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT); 736 m_creature->setFaction(14); 655 737 ToxicSpore_Timer = 5000; 656 738 Check_Timer = 1000; … … 868 950 } 869 951 870 CreatureAI* GetAI_mob_ fathom_sporebat(Creature *_Creature)871 { 872 return new mob_ fathom_sporebatAI (_Creature);952 CreatureAI* GetAI_mob_toxic_sporebat(Creature *_Creature) 953 { 954 return new mob_toxic_sporebatAI (_Creature); 873 955 } 874 956 … … 897 979 898 980 newscript = new Script; 899 newscript->Name="mob_ fathom_sporebat";900 newscript->GetAI = GetAI_mob_ fathom_sporebat;981 newscript->Name="mob_toxic_sporebat"; 982 newscript->GetAI = GetAI_mob_toxic_sporebat; 901 983 m_scripts[nrscripts++] = newscript; 902 984 -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp
r90 r117 430 430 void MoveInLineOfSight(Unit*) {} 431 431 432 // bugged 433 /*void DamageTaken(Unit*, uint32 &damage) 432 void DamageTaken(Unit*, uint32 &damage) 434 433 { 435 434 if(damage >= m_creature->GetHealth()) 436 435 m_creature->CastSpell(m_creature, SPELL_SOUL_TRANSFER, true); 437 } */436 } 438 437 439 438 void JustDied(Unit*) -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp
r90 r117 48 48 TempSpell->EffectImplicitTargetB[0] = 0; 49 49 } 50 TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_SOUL_TRANSFER);51 if(TempSpell && TempSpell->EffectImplicitTargetB[0] != 30)52 {53 TempSpell->EffectImplicitTargetA[0] = 1;54 TempSpell->EffectImplicitTargetA[1] = 1;55 TempSpell->EffectImplicitTargetA[2] = 1;56 TempSpell->EffectImplicitTargetB[0] = 0;57 TempSpell->EffectImplicitTargetB[1] = 0;58 TempSpell->EffectImplicitTargetB[2] = 0;59 }60 // target 8, but core only push back the caster61 TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_DEBRIS_DAMAGE);62 if(TempSpell && TempSpell->EffectImplicitTargetA[0] != 53)63 {64 TempSpell->EffectImplicitTargetA[0] = 53;65 TempSpell->EffectImplicitTargetB[0] = 16;66 }67 TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_DEBRIS_KNOCKDOWN);68 if(TempSpell && TempSpell->EffectImplicitTargetA[0] != 53)69 {70 TempSpell->EffectImplicitTargetA[0] = 53;71 TempSpell->EffectImplicitTargetB[0] = 16;72 TempSpell->EffectImplicitTargetA[1] = 53;73 TempSpell->EffectImplicitTargetB[1] = 16;74 }75 50 } 76 51 … … 220 195 if(Channeler && Channeler->isAlive()) 221 196 { 222 Channeler->CastSpell(Channeler, SPELL_SOUL_TRANSFER, true);197 //Channeler->CastSpell(Channeler, SPELL_SOUL_TRANSFER, true); 223 198 data = IN_PROGRESS; 199 break; 224 200 } 225 201 }break; -
trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
r90 r117 18 18 SDName: Shadowmoon_Valley 19 19 SD%Complete: 100 20 SDComment: Quest support: 10519, 10583, 10601, 10814, 10804, 10854, 11082 . Vendor Drake Dealer Hurlunk. Teleporter TO Invasion Point: Cataclysm20 SDComment: Quest support: 10519, 10583, 10601, 10814, 10804, 10854, 11082, 11108. Vendor Drake Dealer Hurlunk. Teleporter TO Invasion Point: Cataclysm 21 21 SDCategory: Shadowmoon Valley 22 22 EndScriptData */ … … 385 385 }; 386 386 387 CreatureAI* GetAI_mob_dragonmaw_peon(Creature* _Creature) 388 { 389 return new mob_dragonmaw_peonAI(_Creature); 390 } 391 387 392 /*###### 388 393 ## npc_drake_dealer_hurlunk … … 693 698 } 694 699 700 /*#### 701 # quest_lord_illidan_stormrage 702 ####*/ 703 #define QUEST_LORD_ILLIDAN_STORMRAGE 11108 704 #define LORD_ILLIDAN_STORMRAGE 22083 705 706 #define SPELL_ONE 39990 // Red Lightning Bolt 707 #define SPELL_TWO 41528 // Mark of Stormrage 708 #define SPELL_THREE 40216 // Dragonaw Faction 709 #define SPELL_FOUR 42016 // Dragonaw Trasform 710 711 #define OVERLORD_SAY_1 "Come, $N. Lord Stormrage awaits." 712 #define OVERLORD_SAY_2 "Lord Illidan will be here shortly." 713 #define OVERLORD_SAY_3 "Lord Illidan, this is the Dragonmaw that I, and others, have told you about. He will lead us to victory!" 714 #define OVERLORD_SAY_4 "But... My lord, I do not understand. $N... He is the orc that has..." 715 #define OVERLORD_SAY_5 "It will be done, my lord." 716 #define OVERLORD_SAY_6 "So you thought to make a fool of Mor'ghor, eh? Before you are delivered to Lord Illidan, you will feel pain that you could not know to exist. I will take pleasure in exacting my own vengeance." 717 718 #define OVERLORD_YELL_1 "Warriors of Dragonmaw, gather 'round! One among you has attained the rank of highlord! Bow your heads in reverence! Show your respect and allegiance to Highlord $N!" 719 #define OVERLORD_YELL_2 "All hail Lord Illidan!" 720 721 #define LORD_ILLIDAN_SAY_1 "What is the meaning of this, Mor'ghor?" 722 #define LORD_ILLIDAN_SAY_2 "SILENCE!" 723 #define LORD_ILLIDAN_SAY_3 "Blathering idiot. You incomprehensibly incompetent buffoon..." 724 #define LORD_ILLIDAN_SAY_4 "THIS is your hero?" 725 #define LORD_ILLIDAN_SAY_5 "You have been deceived, imbecile." 726 #define LORD_ILLIDAN_SAY_6 "This... whole... operation... HAS BEEN COMPROMISED!" 727 #define LORD_ILLIDAN_SAY_7 "I expect to see this insect's carcass in pieces in my lair within the hour. Fail and you will suffer a fate so much worse than death." 728 729 #define YARZILL_THE_MERC_SAY "You will not harm the boy, Mor'ghor! Quickly, $N, climb on my back!" 730 731 #define GOSSIP_FLY "Lets Do! <MISSING TEXT>" 732 733 bool GossipHello_npc_yarzill_fly(Player *player, Creature *_Creature) 734 { 735 if (player->GetQuestStatus(QUEST_LORD_ILLIDAN_STORMRAGE) == QUEST_STATUS_COMPLETE) 736 { 737 player->ADD_GOSSIP_ITEM(0, GOSSIP_FLY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); 738 player->SEND_GOSSIP_MENU(3961,_Creature->GetGUID()); 739 return true; 740 }else{ 741 return false; 742 } 743 } 744 745 bool GossipSelect_npc_yarzill_fly(Player *player, Creature *_Creature, uint32 sender, uint32 action) 746 { 747 if (action == GOSSIP_ACTION_INFO_DEF + 1) 748 { 749 std::vector<uint32> nodes; 750 nodes.resize(2); 751 nodes[0] = 173; 752 nodes[1] = 174; 753 error_log("SD2: Player %s started quest 11108 which has disabled taxi node, need to be fixed in core", player->GetName()); 754 //player->ActivateTaxiPathTo(nodes, 23468); 755 return true; 756 } 757 return false; 758 } 759 760 struct TRINITY_DLL_DECL Yarzill_The_MercAI : public ScriptedAI 761 { 762 Yarzill_The_MercAI(Creature *c) : ScriptedAI(c) {Reset();} 763 764 void Reset(){} 765 766 void Aggro(Unit *who){} 767 768 void DoSpeach(Unit *target) 769 { 770 DoSay(YARZILL_THE_MERC_SAY,LANG_UNIVERSAL,target); 771 } 772 }; 773 774 struct TRINITY_DLL_DECL Lord_IllidanAI : public ScriptedAI 775 { 776 Lord_IllidanAI(Creature *c) : ScriptedAI(c) {Reset();} 777 778 void Reset(){} 779 780 void Aggro(Unit *who){} 781 782 void DoSpeach(int phase) 783 { 784 switch(phase) 785 { 786 case 1: 787 DoSay(LORD_ILLIDAN_SAY_1,LANG_UNIVERSAL,NULL); 788 break; 789 case 2: 790 DoSay(LORD_ILLIDAN_SAY_2,LANG_UNIVERSAL,NULL); 791 break; 792 case 3: 793 DoSay(LORD_ILLIDAN_SAY_3,LANG_UNIVERSAL,NULL); 794 break; 795 case 4: 796 DoSay(LORD_ILLIDAN_SAY_4,LANG_UNIVERSAL,NULL); 797 break; 798 case 5: 799 DoSay(LORD_ILLIDAN_SAY_5,LANG_UNIVERSAL,NULL); 800 break; 801 case 6: 802 DoSay(LORD_ILLIDAN_SAY_6,LANG_UNIVERSAL,NULL); 803 break; 804 case 7: 805 DoSay(LORD_ILLIDAN_SAY_7,LANG_UNIVERSAL,NULL); 806 break; 807 case 0: 808 default: 809 break; 810 } 811 } 812 }; 813 814 struct TRINITY_DLL_DECL Overlord_MorghorAI : public ScriptedAI 815 { 816 Overlord_MorghorAI(Creature *c) : ScriptedAI(c) {Reset();} 817 818 Unit* m_player; 819 Unit* PlayerCheck; 820 821 uint32 SpeachTimer; 822 uint32 SpeachNum; 823 824 uint64 PlayerGUID; 825 uint64 YazillGUID; 826 827 bool DoingSpeach; 828 bool Failed; 829 830 Creature* Lord; 831 Creature* Yarzill; 832 833 void Reset() 834 { 835 if (Lord) 836 { 837 Lord->SetUInt64Value(UNIT_FIELD_TARGET, 0); 838 Lord->SetVisibility(VISIBILITY_OFF); 839 Lord->setDeathState(JUST_DIED); 840 } 841 842 if (Yarzill) 843 { 844 Yarzill->SetUInt64Value(UNIT_FIELD_TARGET, 0); 845 } 846 847 m_creature->Relocate(-5085.77, 577.231, 86.6719, 2.32608); 848 m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 2); 849 m_creature->SetUInt64Value(UNIT_FIELD_TARGET, 0); 850 m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0); 851 m_player = NULL; 852 PlayerCheck = NULL; 853 PlayerGUID = 0; 854 YazillGUID = 0; 855 Lord = NULL; 856 Yarzill = NULL; 857 DoingSpeach = false; 858 Failed = false; 859 SpeachNum = 0; 860 SpeachTimer = 0; 861 } 862 863 void BeginSpeach(Unit* target) 864 { 865 m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 0); 866 m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0); 867 DoSay(OVERLORD_SAY_1,LANG_UNIVERSAL,target); 868 m_player = target; 869 PlayerCheck = NULL; 870 PlayerGUID = target->GetGUID(); 871 SpeachTimer = 4200; 872 SpeachNum = 0; 873 DoingSpeach = true; 874 } 875 876 void Aggro(Unit *who){} 877 878 void MoveInLineOfSight(Unit *who) 879 { 880 if (!who) 881 return; 882 883 if (DoingSpeach) 884 { 885 if (who->GetEntry() == 23141 && m_creature->IsWithinDistInMap(who, 15)) 886 { 887 if (!YazillGUID) 888 { 889 YazillGUID = who->GetGUID(); 890 } 891 } 892 } 893 } 894 895 void UpdateAI(const uint32 diff) 896 { 897 //Speach 898 if (DoingSpeach) 899 { 900 if (SpeachTimer < diff) 901 { 902 if (YazillGUID && !Yarzill) 903 Yarzill = ((Creature*)Unit::GetUnit((*m_creature), YazillGUID)); 904 905 if (!m_creature->IsWithinDistInMap(m_player, 50) && ((Player*)m_player)->GetQuestStatus(QUEST_LORD_ILLIDAN_STORMRAGE) == QUEST_STATUS_INCOMPLETE) 906 { 907 ((Player*)m_player)->FailQuest(QUEST_LORD_ILLIDAN_STORMRAGE); 908 SpeachNum = 30; 909 } 910 911 switch (SpeachNum) 912 { 913 // Overlord Movement 914 case 0: 915 m_creature->GetMotionMaster()->MovePoint(0, -5104.41, 595.297, 85.6838); 916 SpeachTimer = 9000; SpeachNum++; break; 917 // Overlord Yell 1 918 case 1: 919 m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_SHOUT); 920 DoYell(OVERLORD_YELL_1,LANG_UNIVERSAL,m_player); 921 SpeachTimer = 4500; SpeachNum++; break; 922 // Overlord Angle 923 case 2: 924 m_creature->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID); 925 SpeachTimer = 3200; SpeachNum++; break; 926 // Overlord Say 2 927 case 3: 928 DoSay(OVERLORD_SAY_2,LANG_UNIVERSAL,NULL); 929 SpeachTimer = 2000; SpeachNum++; break; 930 // Summon Illidan 931 case 4: 932 Lord = m_creature->SummonCreature(LORD_ILLIDAN_STORMRAGE, -5107.83, 602.584, 85.2393, 4.92598, TEMPSUMMON_CORPSE_DESPAWN, 0); 933 Lord->LoadCreaturesAddon(); 934 SpeachTimer = 350; SpeachNum++; break; 935 // Illidan Cast Red Bolt 936 case 5: 937 Lord->CastSpell(Lord, SPELL_ONE, true); 938 Lord->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); 939 m_creature->SetUInt64Value(UNIT_FIELD_TARGET, Lord->GetGUID()); 940 SpeachTimer = 2000; SpeachNum++; break; 941 // Overlord Yell 2 942 case 6: 943 DoYell(OVERLORD_YELL_2,LANG_UNIVERSAL,NULL); 944 SpeachTimer = 4500; SpeachNum++; break; 945 // Overlord Kneel 946 case 7: 947 m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,8); 948 SpeachTimer = 2500; SpeachNum++; break; 949 // Overlord Say 3 950 case 8: 951 DoSay(OVERLORD_SAY_3,LANG_UNIVERSAL,NULL); 952 SpeachTimer = 6500; SpeachNum++; break; 953 // Illidan Say 1 954 case 9: 955 ((Lord_IllidanAI*)Lord->AI())->DoSpeach(1); 956 SpeachTimer = 5000; SpeachNum++; break; 957 // Overlord Say 4 958 case 10: 959 DoSay(OVERLORD_SAY_4,LANG_UNIVERSAL,m_player); 960 SpeachTimer = 6000; SpeachNum++; break; 961 // Illidan Say 2 962 case 11: 963 ((Lord_IllidanAI*)Lord->AI())->DoSpeach(2); 964 SpeachTimer = 5500; SpeachNum++; break; 965 // Illidan Say 3 966 case 12: 967 ((Lord_IllidanAI*)Lord->AI())->DoSpeach(3); 968 SpeachTimer = 4000; SpeachNum++; break; 969 // Illidan Angle 970 case 13: 971 Lord->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID); 972 SpeachTimer = 1500; SpeachNum++; break; 973 // Illidan Say 4 974 case 14: 975 ((Lord_IllidanAI*)Lord->AI())->DoSpeach(4); 976 SpeachTimer = 1500; SpeachNum++; break; 977 // Illidan Cast 978 case 15: 979 PlayerCheck = Unit::GetUnit(*Lord, PlayerGUID); 980 if (PlayerCheck) 981 { 982 Lord->CastSpell(m_player, SPELL_TWO, true); 983 m_player->RemoveAurasDueToSpell(SPELL_THREE); 984 m_player->RemoveAurasDueToSpell(SPELL_FOUR); 985 SpeachTimer = 5000; SpeachNum++; 986 } 987 else 988 { 989 ((Player*)m_player)->FailQuest(QUEST_LORD_ILLIDAN_STORMRAGE); 990 SpeachTimer = 100; SpeachNum = 30; 991 } 992 break; 993 // Illidan Say 5 994 case 16: 995 ((Lord_IllidanAI*)Lord->AI())->DoSpeach(5); 996 SpeachTimer = 5000; SpeachNum++; break; 997 // Illidan Say 6 998 case 17: 999 ((Lord_IllidanAI*)Lord->AI())->DoSpeach(6); 1000 SpeachTimer = 5000; SpeachNum++; break; 1001 // Illidan Say 7 1002 case 18: 1003 ((Lord_IllidanAI*)Lord->AI())->DoSpeach(7); 1004 SpeachTimer = 5000; SpeachNum++; break; 1005 // Illidan Fly 1006 case 19: 1007 Lord->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); 1008 Lord->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING); 1009 SpeachTimer = 500; SpeachNum++; break; 1010 // Overlord Say 5 1011 case 20: 1012 DoSay(OVERLORD_SAY_5,LANG_UNIVERSAL,NULL); 1013 SpeachTimer = 500; SpeachNum++; break; 1014 // Illidan Despawn 1015 case 21: 1016 Lord->SetVisibility(VISIBILITY_OFF); 1017 Lord->setDeathState(JUST_DIED); 1018 Lord = NULL; 1019 SpeachTimer = 1000; SpeachNum++; break; 1020 // Overlord Stand Up 1021 case 22: 1022 m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0); 1023 SpeachTimer = 2000; SpeachNum++; break; 1024 // Overlord Angle 1025 case 23: 1026 m_creature->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID); 1027 SpeachTimer = 5000; SpeachNum++; break; 1028 // Overlord Say 6 1029 case 24: 1030 DoSay(OVERLORD_SAY_6,LANG_UNIVERSAL,NULL); 1031 SpeachTimer = 2000; SpeachNum++; break; 1032 // Complete Quest 1033 case 25: 1034 ((Player*)m_player)->CompleteQuest(QUEST_LORD_ILLIDAN_STORMRAGE); 1035 SpeachTimer = 6000; SpeachNum++; break; 1036 // Goblin Angle 1037 case 26: 1038 if (Yarzill) 1039 Yarzill->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID); 1040 SpeachTimer = 500; SpeachNum++; break; 1041 // Cast Again Dragonaw Illusion 1042 case 27: 1043 m_player->RemoveAurasDueToSpell(SPELL_TWO); 1044 m_player->RemoveAurasDueToSpell(41519); 1045 m_player->CastSpell(m_player, SPELL_THREE, true); 1046 m_player->CastSpell(m_player, SPELL_FOUR, true); 1047 SpeachTimer = 1000; SpeachNum++; break; 1048 // Goblin 1049 case 28: 1050 if (Yarzill) 1051 ((Yarzill_The_MercAI*)Yarzill->AI())->DoSpeach(m_player); 1052 SpeachTimer = 5000; SpeachNum++; break; 1053 // Goblin Off 1054 case 29: 1055 if (Yarzill) 1056 Yarzill->SetUInt64Value(UNIT_FIELD_TARGET, 0); 1057 SpeachTimer = 5000; SpeachNum++; break; 1058 // Overlord Go Back 1059 case 30: 1060 m_creature->GetMotionMaster()->MovePoint(0, -5085.77, 577.231, 86.6719); 1061 SpeachTimer = 5000; SpeachNum++; break; 1062 // Reset 1063 case 31: 1064 Reset(); 1065 break; 1066 default: break; 1067 } 1068 }else SpeachTimer -= diff; 1069 } 1070 } 1071 }; 1072 1073 CreatureAI* GetAI_Overlord_Morghor(Creature *_Creature) 1074 { 1075 return new Overlord_MorghorAI(_Creature); 1076 } 1077 1078 CreatureAI* GetAI_Lord_Illidan(Creature *_Creature) 1079 { 1080 return new Lord_IllidanAI(_Creature); 1081 } 1082 1083 CreatureAI* GetAI_Yarzill_The_Merc(Creature *_Creature) 1084 { 1085 return new Yarzill_The_MercAI(_Creature); 1086 } 1087 bool QuestAccept_Overlord_Morghor(Player *player, Creature *_Creature, const Quest *_Quest ) 1088 { 1089 if(_Quest->GetQuestId() == QUEST_LORD_ILLIDAN_STORMRAGE) 1090 { 1091 ((Overlord_MorghorAI*)_Creature->AI())->BeginSpeach((Unit*)player); 1092 return true; 1093 } 1094 return false; 1095 } 1096 695 1097 void AddSC_shadowmoon_valley() 696 1098 { … … 706 1108 newscript->GetAI = GetAI_mob_enslaved_netherwing_drake; 707 1109 m_scripts[nrscripts++] = newscript; 1110 1111 newscript = new Script; 1112 newscript->Name = "mob_dragonmaw_peon"; 1113 newscript->GetAI = GetAI_mob_dragonmaw_peon; 1114 m_scripts[nrscripts++] = newscript; 708 1115 709 1116 newscript = new Script; … … 746 1153 newscript->pGossipSelect = &GossipSelect_npc_oronok_tornheart; 747 1154 m_scripts[nrscripts++] = newscript; 748 } 1155 1156 newscript = new Script; 1157 newscript->Name = "npc_overlord_morghor"; 1158 newscript->GetAI = GetAI_Overlord_Morghor; 1159 newscript->pQuestAccept = &QuestAccept_Overlord_Morghor; 1160 m_scripts[nrscripts++] = newscript; 1161 1162 newscript = new Script; 1163 newscript->Name = "npc_lord_illidan_stormrage"; 1164 newscript->GetAI = GetAI_Lord_Illidan; 1165 m_scripts[nrscripts++] = newscript; 1166 1167 newscript = new Script; 1168 newscript->Name = "npc_yarzill_the_merc"; 1169 newscript->GetAI = GetAI_Yarzill_The_Merc; 1170 newscript->pGossipHello = &GossipHello_npc_yarzill_fly; 1171 newscript->pGossipSelect = &GossipSelect_npc_yarzill_fly; 1172 m_scripts[nrscripts++] = newscript; 1173 } -
trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp
r109 r117 405 405 Unit* Temp = Unit::GetUnit((*m_creature),pInstance->GetData64(DATA_SACROLASH)); 406 406 if (Temp && Temp->isAlive() && !(Temp->getVictim())) 407 Temp->getThreatManager().addThreat(who,0.0f); 408 } 409 } 410 411 void AttackStart(Unit *who) 412 { 413 if (!who) 414 return; 415 416 if (who->isTargetableForAttack() && who!= m_creature) 417 { 418 if (!InCombat) 419 { 420 DoStartNoMovement(who); 421 Aggro(who); 422 InCombat = true; 423 } 424 } 425 } 407 Temp->getThreatManager().addThreat(who,0.0f); 408 } 409 } 410 411 void AttackStart(Unit *who) 412 { 413 if (!InCombat) 414 { 415 ScriptedAI::AttackStart(who); 416 } 417 } 426 418 427 419 void MoveInLineOfSight(Unit *who) -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_alar.cpp
r109 r117 150 150 void AttackStart(Unit* who) 151 151 { 152 if(!who) 153 return; 154 155 if(who->isTargetableForAttack()) 156 { 157 //Begin attack 158 if(Phase1) 159 DoStartNoMovement(who); 160 else 161 DoStartMovement(who); 162 163 if(!InCombat) 164 { 165 Aggro(who); 166 InCombat = true; 167 } 168 } 152 if(Phase1) 153 ScriptedAI::AttackStart(who, false); 154 else 155 ScriptedAI::AttackStart(who, true); 169 156 } 170 157 -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp
r90 r117 67 67 68 68 Pounding_Timer = 12000; 69 ArcaneOrb_Timer = 6000;69 ArcaneOrb_Timer = 3000; 70 70 KnockAway_Timer = 30000; 71 71 Berserk_Timer = 600000; … … 156 156 m_creature->CastSpell(target, SPELL_ARCANE_ORB, true); 157 157 158 ArcaneOrb_Timer = 6000;158 ArcaneOrb_Timer = 3000; 159 159 }else ArcaneOrb_Timer -= diff; 160 160 -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_halazzi.cpp
r90 r117 78 78 pInstance = ((ScriptedInstance*)c->GetInstanceData()); 79 79 Reset(); 80 // wait for core patch be accepted81 SpellEntry *TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_SUMMON_TOTEM);82 if(TempSpell && TempSpell->EffectImplicitTargetA[0] != 1)83 TempSpell->EffectImplicitTargetA[0] = 1;84 80 // need to find out what controls totem's spell cooldown 85 TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_LIGHTNING);81 SpellEntry *TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_LIGHTNING); 86 82 if(TempSpell && TempSpell->CastingTimeIndex != 5) 87 83 TempSpell->CastingTimeIndex = 5; // 2000 ms casting time -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_zuljin.cpp
r109 r117 269 269 void AttackStart(Unit *who) 270 270 { 271 if(!who) 272 return; 273 274 if (who->isTargetableForAttack()) 275 { 276 if(Phase == 2) 277 m_creature->Attack(who, false); 278 else 279 DoStartMovement(who); 280 281 if (!InCombat) 282 { 283 Aggro(who); 284 InCombat = true; 285 } 286 } 271 if(Phase == 2) 272 ScriptedAI::AttackStart(who, false); 273 else 274 ScriptedAI::AttackStart(who, true); 287 275 } 288 276