User Tag List

Results 1 to 3 of 3

Thread: [SunwellCore] Blackwing Lair

  1. #1
    Emulation Addict
    Join Date
    Aug 2015
    Posts
    51
    XP
    1,256
    Level
    9
    Thanks
    14
    Thanked 3 Times in 1 Post

    [SunwellCore] Blackwing Lair [SOLVED]

    Hey guys, I am creating a Vanilla in WOTLK type of server and using SunwellCore is great with all the instances scripted and working. However, BWL is available and works and is clearable except Razorgore. You would click on the orb and the spell Destory Egg doesn't work. I've tried using official TC script and spent over ~72 hours attempting to do this and I would like to seek some insight if anyone know if it works. Also the spell that the mind control is using is the wrong spell in both TC and SWC. I tried using the official spellid from MangosZero but it seems that the spell has a script itself needs editing possibly.

    Any help or guides in the right direction would be phenomenal!

    -Render

    UPDATE:
    Eggs now properly despawn but still wrong spell and razegore doesn't change phases.
    Last edited by Render1982; 10-19-2016 at 12:11 PM.
    Achievements:
    Level V 1 year registered

  2. #2
    Original Poster
    Emulation Addict
    Join Date
    Aug 2015
    Posts
    51
    XP
    1,256
    Level
    9
    Thanks
    14
    Thanked 3 Times in 1 Post
    I think I got it somewhat fixed haven't tested.

    blackwing_lair.h
    Code:
    enum BWLMisc
    {
    	EGGS_NEEDED = 15,
    
    	// Razorgore Egg Event
    	ACTION_PHASE_TWO = 1,
    	DATA_EGG_EVENT
    };
    
    #endif
    instance_blackwing_lair.cpp (This EggCount is completely seperate from boss_razorgore.cpp I've tried :^^])
    Code:
    		void SetData(uint32 type, uint32 data)
    		{
    			if (type == DATA_EGG_EVENT)
    			{
    				switch (data)
    				{
    				case IN_PROGRESS:
    					_events.ScheduleEvent(EVENT_RAZOR_SPAWN, 45 * IN_MILLISECONDS);
    					EggEvent = data;
    					EggCount = 0;
    					break;
    				case NOT_STARTED:
    					_events.CancelEvent(EVENT_RAZOR_SPAWN);
    					EggEvent = data;
    					EggCount = 0;
    					break;
    				case SPECIAL:
    					if (++EggCount == EGGS_NEEDED)
    					{
    						if (Creature* razor = instance->GetCreature(RazorgoreTheUntamedGUID))
    						{
    							SetData(DATA_EGG_EVENT, DONE);
    							razor->RemoveAurasDueToSpell(42013); // MindControl
    							DoRemoveAurasDueToSpellOnPlayers(42013);
    						}
    						_events.ScheduleEvent(EVENT_RAZOR_PHASE_TWO, IN_MILLISECONDS);
    						_events.CancelEvent(EVENT_RAZOR_SPAWN);
    					}
    					if (EggEvent == NOT_STARTED)
    						SetData(DATA_EGG_EVENT, IN_PROGRESS);
    					break;
    				}
    			}
    		}
    boss_razorgore.cpp
    Code:
    class spell_egg_event : public SpellScriptLoader
    {
    public:
    	spell_egg_event() : SpellScriptLoader("spell_egg_event") { }
    
    	class spell_egg_eventSpellScript : public SpellScript
    	{
    		PrepareSpellScript(spell_egg_eventSpellScript);
    		uint8 EggCount = 0;
    
    		void HandleOnHit()
    		{
    				if (InstanceScript* instance = GetCaster()->GetInstanceScript())
    					instance->SetData(DATA_EGG_EVENT, SPECIAL);
    
    				if (InstanceScript* instance = GetCaster()->GetInstanceScript()) {
    					if (GameObject* egg = GetCaster()->FindNearestGameObject(GO_EGG, 100))
    					{
    						egg->SetLootState(GO_READY);
    						egg->UseDoorOrButton(10 * IN_MILLISECONDS);
    						EggCount++;
    					}
    
    					if (EggCount == EGGS_NEEDED) // If all the eggs are gone then activate phase 2.
    					{
    						instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MINDCONTROL);
    					}
    			}
    		}
    
    		void Register()
    		{
    			OnHit += SpellHitFn(spell_egg_eventSpellScript::HandleOnHit);
    		}
    	};
    
    	SpellScript* GetSpellScript() const
    	{
    		return new spell_egg_eventSpellScript();
    	}
    };

  3. #3
    Original Poster
    Emulation Addict
    Join Date
    Aug 2015
    Posts
    51
    XP
    1,256
    Level
    9
    Thanks
    14
    Thanked 3 Times in 1 Post
    Fixed marked as solved

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •