• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

TrinityCore 3.3.5 [SunwellCore] Blackwing Lair

Render1982

Emulation Addict
[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:

Render1982

Emulation Addict
I think I got it somewhat fixed haven't tested.

blackwing_lair.h
Code:
enum BWLMisc
{
	[COLOR="#FF0000"]EGGS_NEEDED = 15,[/COLOR]

	// 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 == [COLOR="#FF0000"]EGGS_NEEDED[/COLOR])
					{
						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);
		[COLOR="#FF0000"]uint8 EggCount = 0;[/COLOR]

		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);
						[COLOR="#FF0000"]EggCount++;[/COLOR]
					}

					if (EggCount == [COLOR="#FF0000"]EGGS_NEEDED[/COLOR]) // 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();
	}
};
 
Top