Changeset 18 for trunk/src/bindings
- Timestamp:
- 11/19/08 13:23:29 (17 years ago)
- Location:
- trunk/src/bindings/scripts
- Files:
-
- 20 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bindings/scripts/docs/EventAI.txt
r2 r18 680 680 3 8 CAST_NO_MELEE_IF_OOM Prevents creature from entering melee if out of mana or out of range 681 681 4 16 CAST_FORCE_TARGET_SELF Forces the target to cast this spell on itself 682 5 32 CAST_AURA_NOT_PRESENT Only casts the spell on the target if the target does not have the aura from that spell on itself already. 682 683 683 684 NOTE: You can add the numbers in the decimal column to combine flags. -
trunk/src/bindings/scripts/include/sc_creature.cpp
r13 r18 36 36 if (!InCombat) 37 37 { 38 InCombat = true; 38 39 Aggro(who); 39 InCombat = true;40 40 } 41 41 } … … 55 55 if (!InCombat) 56 56 { 57 InCombat = true; 57 58 Aggro(who); 58 InCombat = true;59 59 } 60 60 } … … 583 583 if (!InCombat) 584 584 { 585 InCombat = true; 585 586 Aggro(who); 586 InCombat = true;587 587 } 588 588 } … … 602 602 if (!InCombat) 603 603 { 604 InCombat = true; 604 605 Aggro(who); 605 InCombat = true;606 606 } 607 607 } -
trunk/src/bindings/scripts/scripts/creature/mob_event_ai.cpp
r14 r18 56 56 ProcessEvent(*i); 57 57 break; 58 default:59 break;60 58 } 61 59 } … … 613 611 } 614 612 615 //Interrupt any previous spell 616 if (caster->IsNonMeleeSpellCasted(false) && param3 & CAST_INTURRUPT_PREVIOUS) 617 caster->InterruptNonMeleeSpells(false); 618 619 //Cast only if not casting or if spell is triggered 620 if (param3 & CAST_TRIGGERED || !caster->IsNonMeleeSpellCasted(false)) 613 //Allowed to cast only if not casting (unless we interrupt ourself) or if spell is triggered 614 bool canCast = !(caster->IsNonMeleeSpellCasted(false) && (param3 & CAST_TRIGGERED | CAST_INTURRUPT_PREVIOUS)); 615 616 // If cast flag CAST_AURA_NOT_PRESENT is active, check if target already has aura on them 617 if(param3 & CAST_AURA_NOT_PRESENT) 618 { 619 for(uint8 i = 0; i < 3; ++i) 620 if(target->HasAura(param1, i)) 621 return; 622 } 623 624 if (canCast) 621 625 { 622 626 const SpellEntry* tSpell = GetSpellStore()->LookupEntry(param1); … … 639 643 } 640 644 641 }else caster->CastSpell(target, param1, (param3 & CAST_TRIGGERED)); 645 }else 646 { 647 //Interrupt any previous spell 648 if (caster->IsNonMeleeSpellCasted(false) && param3 & CAST_INTURRUPT_PREVIOUS) 649 caster->InterruptNonMeleeSpells(false); 650 651 caster->CastSpell(target, param1, (param3 & CAST_TRIGGERED)); 652 } 642 653 643 654 }else if (EAI_ErrorLevel > 0) … … 997 1008 } 998 1009 break; 999 default:1010 //default: 1000 1011 //TODO: enable below code line / verify this is correct to enable events previously disabled (ex. aggro yell), instead of enable this in void Aggro() 1001 1012 //(*i).Enabled = true; 1002 1013 //(*i).Time = 0; 1003 break;1014 //break; 1004 1015 } 1005 1016 } … … 1030 1041 ProcessEvent(*i); 1031 1042 break; 1032 default:1033 break;1034 1043 } 1035 1044 } … … 1051 1060 ProcessEvent(*i, killer); 1052 1061 break; 1053 default:1054 break;1055 1062 } 1056 1063 } … … 1070 1077 ProcessEvent(*i, victim); 1071 1078 break; 1072 default:1073 break;1074 1079 } 1075 1080 } … … 1089 1094 case EVENT_T_SUMMONED_UNIT: 1090 1095 ProcessEvent(*i, pUnit); 1091 break;1092 default:1093 1096 break; 1094 1097 } … … 1146 1149 if (!InCombat) 1147 1150 { 1151 InCombat = true; 1148 1152 Aggro(who); 1149 InCombat = true;1150 1153 } 1151 1154 } … … 1194 1197 if (!InCombat) 1195 1198 { 1199 InCombat = true; 1196 1200 Aggro(who); 1197 InCombat = true;1198 1201 } 1199 1202 } … … 1215 1218 ProcessEvent(*i, pUnit); 1216 1219 } 1217 break;1218 default:1219 1220 break; 1220 1221 } -
trunk/src/bindings/scripts/scripts/creature/mob_event_ai.h
r6 r18 114 114 CAST_NO_MELEE_IF_OOM = 0x08, //Prevents creature from entering melee if out of mana or out of range 115 115 CAST_FORCE_TARGET_SELF = 0x10, //Forces the target to cast this spell on itself 116 CAST_AURA_NOT_PRESENT = 0x20, //Only casts the spell if the target does not have an aura from the spell 116 117 }; 117 118 -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
r6 r18 105 105 Class_Timer = 10000; 106 106 break; 107 default:108 break;109 107 } 110 108 }else Class_Timer -= diff; … … 205 203 if (!InCombat) 206 204 { 205 InCombat = true; 207 206 Aggro(who); 208 InCombat = true;209 207 } 210 208 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp
r6 r18 107 107 if (!InCombat) 108 108 { 109 InCombat = true; 109 110 Aggro(who); 110 InCombat = true;111 111 } 112 112 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_tailonking_ikiss.cpp
r6 r18 116 116 if (!InCombat) 117 117 { 118 InCombat = true; 118 119 Aggro(who); 119 InCombat = true;120 120 } 121 121 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp
r6 r18 126 126 if (!InCombat) 127 127 { 128 InCombat = true; 128 129 Aggro(who); 129 InCombat = true;130 130 } 131 131 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp
r6 r18 75 75 if (!InCombat) 76 76 { 77 InCombat = true; 77 78 Aggro(who); 78 InCombat = true;79 79 } 80 80 } … … 96 96 if (!InCombat) 97 97 { 98 InCombat = true; 98 99 Aggro(who); 99 InCombat = true;100 100 } 101 101 } -
trunk/src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp
r6 r18 62 62 if (!InCombat) 63 63 { 64 InCombat = true; 64 65 Aggro(who); 65 InCombat = true;66 66 } 67 67 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp
r6 r18 118 118 if (!InCombat) 119 119 { 120 InCombat = true; 120 121 Aggro(who); 121 InCombat = true;122 122 } 123 123 } … … 139 139 if (!InCombat) 140 140 { 141 InCombat = true; 141 142 Aggro(who); 142 InCombat = true;143 143 } 144 144 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp
r6 r18 109 109 if (!InCombat) 110 110 { 111 InCombat = true; 111 112 Aggro(who); 112 InCombat = true;113 113 } 114 114 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp
r6 r18 201 201 if( !InCombat ) 202 202 { 203 InCombat = true; 203 204 Aggro(who); 204 InCombat = true;205 205 } 206 206 } … … 238 238 if( !InCombat ) 239 239 { 240 InCombat = true; 240 241 Aggro(who); 241 InCombat = true;242 242 } 243 243 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp
r6 r18 583 583 { 584 584 //Check for base attack 585 if( m_creature->isAttackReady() )585 if( m_creature->isAttackReady() && m_creature->getVictim() ) 586 586 { 587 587 m_creature->AttackerStateUpdate(m_creature->getVictim()); … … 589 589 } 590 590 //Check for offhand attack 591 if( m_creature->isAttackReady(OFF_ATTACK) )591 if( m_creature->isAttackReady(OFF_ATTACK) && m_creature->getVictim() ) 592 592 { 593 593 m_creature->AttackerStateUpdate(m_creature->getVictim(), OFF_ATTACK); -
trunk/src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp
r6 r18 164 164 FlamewakerPriest = creature->GetGUID(); 165 165 break; 166 167 default:168 return;169 166 } 170 167 } -
trunk/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp
r6 r18 265 265 ++Phase; 266 266 break; 267 default:268 break;269 267 } 270 268 } else Event_Timer -= diff; -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/arcatraz.cpp
r6 r18 139 139 if (!InCombat) 140 140 { 141 InCombat = true; 141 142 Aggro(who); 142 InCombat = true;143 143 } 144 144 } … … 154 154 if (!InCombat) 155 155 { 156 InCombat = true; 156 157 Aggro(who); 157 InCombat = true;158 158 } 159 159 } … … 445 445 pInstance->SetData(TYPE_WARDEN_5,IN_PROGRESS); 446 446 break; 447 default:448 break;449 447 } 450 448 CanSpawn = true; … … 506 504 DoPlaySoundToSet(m_creature,SOUND_WELCOME); 507 505 break; 508 default:509 break;510 506 } 511 507 CanSpawn = false; … … 554 550 EventProgress_Timer = 15000; 555 551 break; 556 default:557 break;558 552 } 559 553 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp
r6 r18 131 131 if (!InCombat) 132 132 { 133 InCombat = true; 133 134 Aggro(who); 134 InCombat = true;135 135 } 136 136 } … … 149 149 if( !InCombat ) 150 150 { 151 InCombat = true; 151 152 Aggro(who); 152 InCombat = true;153 153 } 154 154 } … … 237 237 Intro = true; 238 238 break; 239 default:240 break;241 239 } 242 240 }else Intro_Timer -=diff; -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp
r6 r18 216 216 if (!InCombat) 217 217 { 218 InCombat = true; 218 219 Aggro(who); 219 InCombat = true;220 220 } 221 221 } … … 235 235 if (!InCombat) 236 236 { 237 InCombat = true; 237 238 Aggro(who); 238 InCombat = true;239 239 } 240 240 } … … 864 864 DoPlaySoundToSet(m_creature, SOUND_SUMMON_PHOENIX1); 865 865 break; 866 867 866 case 1: 868 867 DoYell(SAY_SUMMON_PHOENIX2, LANG_UNIVERSAL, NULL); 869 868 DoPlaySoundToSet(m_creature, SOUND_SUMMON_PHOENIX2); 870 break;871 872 default:873 869 break; 874 870 } … … 1253 1249 if (!InCombat) 1254 1250 { 1251 InCombat = true; 1255 1252 Aggro(who); 1256 InCombat = true;1257 1253 } 1258 1254 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp
r6 r18 666 666 if (!InCombat) 667 667 { 668 InCombat = true; 668 669 Aggro(who); 669 InCombat = true;670 670 } 671 671 }