Changeset 160
- Timestamp:
- 11/19/08 13:41:50 (17 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/sql/updates/146_world.sql
r138 r160 14 14 VALUES 15 15 (44008, 45265, 1, 'Static Disruption Visual'); 16 17 INSERT INTO spell_linked_spell18 (`spell_trigger`, `spell_effect`, `type`, `comment`)19 VALUES20 (42052, 40118, 0, 'Volcanic Geyser Visual');21 22 INSERT INTO spell_linked_spell23 (`spell_trigger`, `spell_effect`, `type`, `comment`)24 VALUES25 (-41914, 41915, 0, 'Summon Parasitic Shadowfiend\r\n');26 27 INSERT INTO spell_linked_spell28 (`spell_trigger`, `spell_effect`, `type`, `comment`)29 VALUES30 (46021, 44852, 1, 'Spectral Realm Aura');31 32 INSERT INTO spell_linked_spell33 (`spell_trigger`, `spell_effect`, `type`, `comment`)34 VALUES35 (-46021, 44867, 0, 'Spectral Exhaustion');36 16 37 17 INSERT INTO spell_linked_spell -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp
r158 r160 26 26 27 27 //Spells 28 #define SPELL_MOLTEN_PUNCH 40126 28 29 #define SPELL_HURTFUL_STRIKE 41926 29 #define SPELL_DEMON_FIRE 4002930 30 #define SPELL_MOLTEN_FLAME 40253 31 #define SPELL_VOLCANIC_ERUPTION 40276 32 #define SPELL_VOLCANIC_FIREBALL 40118 33 #define SPELL_VOLCANIC_GEYSER 42055 34 #define SPELL_MOLTEN_PUNCH 40126 31 #define SPELL_VOLCANIC_ERUPTION 40117 32 #define SPELL_VOLCANIC_SUMMON 40276 35 33 #define SPELL_BERSERK 45078 36 34 … … 42 40 molten_flameAI(Creature *c) : ScriptedAI(c) 43 41 { 44 Reset(); 45 } 46 47 uint64 SupremusGUID; 48 bool TargetLocked; 49 uint32 CheckTimer; 50 51 void Reset() 52 { 53 SupremusGUID = 0; 54 TargetLocked = false; 55 56 CheckTimer = 1000; 57 } 58 42 FlameTimer = 0; 43 float x, y, z; 44 m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); 45 m_creature->GetNearPoint(m_creature, x, y, z, 1, 50, M_PI*2*rand_norm()); 46 m_creature->GetMotionMaster()->MovePoint(0, x, y, z); 47 } 48 49 uint32 FlameTimer; 50 51 void Reset() {} 59 52 void Aggro(Unit *who) {} 60 53 void AttackStart(Unit* who) {} 61 void MoveInLineOfSight(Unit *who) 62 { 63 if(TargetLocked) 64 return; // stop it from aggroing players who move in LOS if we have a target. 65 if(who && (who != m_creature) && (m_creature->IsWithinDistInMap(who, 10))) 66 StalkTarget(who); 67 } 68 69 void SetSupremusGUID(uint64 GUID) { SupremusGUID = GUID; } 70 71 void StalkTarget(Unit* target) 72 { 73 if(!target) return; 74 75 m_creature->AddThreat(target, 50000000.0f); 76 m_creature->GetMotionMaster()->MoveChase(target); 77 DoCast(m_creature, SPELL_DEMON_FIRE, true); 78 // DoCast(m_creature, SPELL_MOLTEN_FLAME, true); // This spell damages self, so disabled for now 79 TargetLocked = true; 80 } 81 54 void MoveInLineOfSight(Unit *who) {} 82 55 void UpdateAI(const uint32 diff) 83 56 { 84 if (!m_creature->SelectHostilTarget()) 85 return; 86 87 if(m_creature->getVictim() && m_creature->isAlive()) 88 { 89 if(CheckTimer < diff) 90 { 91 if(SupremusGUID) 92 { 93 Unit* Supremus = NULL; 94 Supremus = Unit::GetUnit((*m_creature), SupremusGUID); 95 if(Supremus && (!Supremus->isAlive())) 96 m_creature->DealDamage(m_creature, m_creature->GetHealth(), 0, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); 97 } 98 CheckTimer = 2000; 99 }else CheckTimer -= diff; 100 } 57 if(FlameTimer < diff) 58 { 59 m_creature->CastSpell(m_creature, SPELL_MOLTEN_FLAME, true); 60 FlameTimer = 1000; 61 }else FlameTimer -= diff; 101 62 } 102 63 }; … … 104 65 struct TRINITY_DLL_DECL npc_volcanoAI : public ScriptedAI 105 66 { 106 npc_volcanoAI(Creature *c) : ScriptedAI(c) {Reset();} 107 108 uint32 CheckTimer; 109 uint64 SupremusGUID; 110 uint32 FireballTimer; 111 uint32 GeyserTimer; 112 113 void Reset() 114 { 115 CheckTimer = 1000; 116 SupremusGUID = 0; 117 FireballTimer = 500; 118 GeyserTimer = 0; 67 npc_volcanoAI(Creature *c) : ScriptedAI(c) 68 { 69 m_creature->CastSpell(m_creature, SPELL_VOLCANIC_ERUPTION, false); 119 70 m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); 120 71 m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); 121 72 } 122 73 74 void Reset() {} 123 75 void Aggro(Unit *who) {} 124 76 void AttackStart(Unit* who) {} 125 77 void MoveInLineOfSight(Unit* who) {} 126 127 void UpdateAI(const uint32 diff) 128 { 129 if(GeyserTimer < diff) 130 { 131 DoCast(m_creature, SPELL_VOLCANIC_GEYSER); 132 GeyserTimer = 18000; 133 }else GeyserTimer -= diff; 134 135 if(FireballTimer < diff) 136 { 137 DoCast(m_creature, SPELL_VOLCANIC_FIREBALL, true); 138 FireballTimer = 1000; 139 }else FireballTimer -= diff; 140 } 78 void UpdateAI(const uint32 diff) {} 141 79 }; 142 80 143 81 struct TRINITY_DLL_DECL boss_supremusAI : public ScriptedAI 144 82 { 145 boss_supremusAI(Creature *c) : ScriptedAI(c) 83 boss_supremusAI(Creature *c) : ScriptedAI(c), summons(m_creature) 146 84 { 147 85 pInstance = ((ScriptedInstance*)c->GetInstanceData()); … … 160 98 bool Phase1; 161 99 100 SummonList summons; 101 162 102 void Reset() 163 103 { … … 180 120 181 121 Phase1 = true; 122 summons.DespawnAll(); 182 123 } 183 124 … … 206 147 ToggleDoors(false); 207 148 } 208 } 209 210 float CalculateRandomCoord(float initial) 211 { 212 float coord = 0; 213 214 switch(rand()%2) 215 { 216 case 0: coord = initial + 20 + rand()%20; break; 217 case 1: coord = initial - 20 - rand()%20; break; 218 } 219 220 return coord; 221 } 222 223 Creature* SummonCreature(uint32 entry, Unit* target) 224 { 225 if(target && entry) 226 { 227 Creature* Summon = m_creature->SummonCreature(entry, CalculateRandomCoord(target->GetPositionX()), CalculateRandomCoord(target->GetPositionY()), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 20000); 228 if(Summon) 229 { 230 Summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); 231 Summon->setFaction(m_creature->getFaction()); 232 return Summon; 233 } 234 } 235 return NULL; 236 } 149 summons.DespawnAll(); 150 } 151 152 void JustSummoned(Creature *summon) {summons.Summon(summon);} 153 void SummonedCreatureDespawn(Creature *summon) {summons.Despawn(summon);} 237 154 238 155 Unit* CalculateHurtfulStrikeTarget() … … 271 188 if(SummonFlameTimer < diff) 272 189 { 273 Unit* target = NULL; 274 target = SelectUnit(SELECT_TARGET_RANDOM, 1); 275 276 if(!target) // someone is trying to solo, set target as current victim. 277 target = m_creature->getVictim(); 278 279 if(target) 280 { 281 Creature* MoltenFlame = SummonCreature(CREATURE_STALKER, target); 282 if(MoltenFlame) 283 { 284 // Invisible model 285 MoltenFlame->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686); 286 ((molten_flameAI*)MoltenFlame->AI())->SetSupremusGUID(m_creature->GetGUID()); 287 ((molten_flameAI*)MoltenFlame->AI())->StalkTarget(target); 288 SummonFlameTimer = 20000; 289 } 290 } 190 DoCast(m_creature, SPELL_MOLTEN_PUNCH); 191 SummonFlameTimer = 20000; 291 192 }else SummonFlameTimer -= diff; 292 193 … … 295 196 if(HurtfulStrikeTimer < diff) 296 197 { 297 Unit* target = CalculateHurtfulStrikeTarget(); 298 if(target) 198 if(Unit* target = CalculateHurtfulStrikeTarget()) 299 199 { 300 200 DoCast(target, SPELL_HURTFUL_STRIKE); … … 308 208 if(SwitchTargetTimer < diff) 309 209 { 310 Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0); 311 if(target) 210 if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1, 100, true)) 312 211 { 313 212 DoResetThreat(); … … 316 215 SwitchTargetTimer = 10000; 317 216 } 318 319 217 }else SwitchTargetTimer -= diff; 320 218 321 219 if(SummonVolcanoTimer < diff) 322 220 { 323 Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1); 324 325 if(!target) 326 target = m_creature->getVictim(); 327 328 if(target) 329 { 330 DoCast(target, SPELL_VOLCANIC_ERUPTION); 221 if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 999, true)) 222 { 223 DoCast(target, SPELL_VOLCANIC_SUMMON); 331 224 DoTextEmote("roars and the ground begins to crack open!", NULL); 332 225 SummonVolcanoTimer = 10000; … … 342 235 DoResetThreat(); 343 236 PhaseSwitchTimer = 60000; 344 m_creature->SetSpeed(MOVE_RUN, 1. 0f);237 m_creature->SetSpeed(MOVE_RUN, 1.2f); 345 238 DoZoneInCombat(); 346 239 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp
r90 r160 59 59 60 60 //Spells 61 #define SPELL_NEEDLE_SPINE 39835 62 #define SPELL_NEEDLE_AOE 39968 61 #define SPELL_NEEDLE_SPINE 39992 63 62 #define SPELL_TIDAL_BURST 39878 64 63 #define SPELL_TIDAL_SHIELD 39872 … … 181 180 }else EnrageTimer -= diff; 182 181 183 // Needle184 182 if(NeedleSpineTimer < diff) 185 183 { 186 for(uint8 i = 0; i < 3; ++i)187 {188 if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))189 m_creature->CastSpell(target, SPELL_NEEDLE_SPINE, true);190 }191 NeedleSpineTimer = 30000;184 //m_creature->CastSpell(m_creature, SPELL_NEEDLE_SPINE, true); 185 std::list<Unit*> target; 186 SelectUnitList(target, 3, SELECT_TARGET_RANDOM, 80, true); 187 for(std::list<Unit*>::iterator i = target.begin(); i != target.end(); ++i) 188 m_creature->CastSpell(*i, 39835, true); 189 NeedleSpineTimer = 20000+rand()%5000; 192 190 }else NeedleSpineTimer -= diff; 193 191 -
trunk/src/game/SpellEffects.cpp
r157 r160 4854 4854 case 28698: unitTarget->CastSpell(unitTarget, 28694, true); break; 4855 4855 // Needle Spine 4856 case 39835: unitTarget->CastSpell(unitTarget, 39968, true); break;4856 //case 39835: unitTarget->CastSpell(unitTarget, 39968, true); break; 4857 4857 // Draw Soul 4858 4858 case 40904: unitTarget->CastSpell(m_caster, 40903, true); break; 4859 4859 // Flame Crash 4860 case 41126: unitTarget->CastSpell(unitTarget, 41131, true); break;4860 //case 41126: unitTarget->CastSpell(unitTarget, 41131, true); break; 4861 4861 case 41931: 4862 4862 { -
trunk/src/game/SpellMgr.cpp
r157 r160 2032 2032 tempAttr.attr[SPELL_EXTRA_ATTR_MAX_TARGETS] = 3; 2033 2033 mSpellExtraAttrMap[41376] = tempAttr; //Spite 2034 mSpellExtraAttrMap[39992] = tempAttr; //Needle Spine 2034 2035 tempAttr.attr[SPELL_EXTRA_ATTR_MAX_TARGETS] = 0; 2035 2036