Trinitycore: [3.3.5][Karazhan] Core/Creature: Nightbane Encounter

Created on 12 Jun 2013  ·  34Comments  ·  Source: TrinityCore/TrinityCore

Dragon can summon Blackened urn does anyone repair or good advice on how to fix it? Thank you all
https://github.com/TrinityCore/TrinityCore

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Branch-3.3.5a Branch-master Comp-C++Script Comp-Core Feedback-FixHack Sub-Instances

Most helpful comment

don't be so rude please. do you actually ever saw a spellscript in tc that activates manually a path for a creature? i never saw such stuff. Best would be to set an action from the gameobject to the creature, and the creature handles the rest.

sth. like

class go_blackened_urn : public GameObjectScript
{
    public:
        go_blackened_urn() : GameObjectScript("go_blackened_urn") { }

        bool OnGossipHello(Player* player, GameObject* go) override
        {
            if (InstanceScript* instance = go->GetInstanceScript())
                if (Creature* nightbane = ObjectAccessor::GetCreature(*go, instance->GetGuidData(DATA_NIGHTBANE)))
                    nightbane->AI()->DoAction(ACTION_START_INTRO);
            go->SendUpdateToPlayer(player);
            return true;
        }
    };
};

and then in the nightbane AI itself:

            void DoAction(int32 param) override
            {
                if (param == ACTION_START_INTRO && instance && instance->GetBossState(DATA_NIGHTBANE) == NOT_STARTED) // Blackened Urn activated
                {
                    Intro = true;
                    Flying = false;
                    WaypointReached = true;
                    me->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
                    me->SetCanFly(true);
                    me->SetDisableGravity(true);
                    me->SetStandState(UNIT_STAND_STATE_STAND);
                    me->setActive(true);
                    me->SetWalk(false);
                    HandleTerraceDoors(false);

                    me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);

                    instance->SetBossState(DATA_NIGHTBANE, IN_PROGRESS);
                }
            }

All 34 comments

confirm

confirmed blackened urn exists but clicking it does nothing,

Confirmed, Nightbane is scripted so only the script to summon him when a player clicks on the urn is missing.

Confirming the issue. As of #975, Urn is spawned however, clicking on the Urn does not make Nighbane spawn.

Revision: 055af93145a636913e2592993aa87e828ee00a66
TDB52 + Repo updates

Still broken as of rev 2bcd9c543f1f

If you look up the Blackened Urn in the database, it is quite obvious why it does not work:

SELECT * FROM `gameobject_template` WHERE `name` LIKE '%blackened%';
 entry    type  displayId  name           IconName  castBarCaption  unk1    faction   flags    size   Data0   Data1   Data2   Data3   Data4   Data5   Data6   Data7   Data8   Data9  Data10  Data11  Data12  Data13  Data14  Data15  Data16  Data17  Data18  Data19  Data20  Data21  Data22  Data23  AIName  ScriptName  VerifiedBuild
------  ------  ---------  -------------  --------  --------------  ------  -------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ----------  ---------------
194092       1       6358  Blackened Urn            Summoning                     0       0       1       0    1691   60000       0       0       0   21062       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0       0                              12340

Note the following:

  • the Blackened Urn gameobject type is 'buttion' (1) - it requires some script or AI
  • the DB fields AIName and ScriptName are empty for this gameobject
  • Data6 = 21062 only links to the broadcast_text "Summoning" (same as castBarCaption)
  • when searching the TC repo for Blackened Urn, I find that it was faction 1924 in the 4.3.4 branch

I don't know how the script boss_nightbane should be triggered, so it would be great if someone could point me to a similar, working instance where the event is triggered by a button.

What about malygos in eye of eternity? The summoning seems similar ingame (you click a GO and maly spawns). Not sure how the object is scripted.

Hmm. Thanks for the tip. I think I will check this out in GM mode to see what it looks like in both places.
For all I know, there could be an invisible spell bunny trigger NPC in the same spot as the object.
So I don't know if this is triggered by a very narrow area trigger or triggered by scripted object.

Hello guys. Any update on this issue?

No.

Confirmed in:
TC: 10bc41c91e96b51aac4d811d20b535fff9562edd
DB: TDB_full_world_335.61_2016_04_11

Blackened Urn
https://github.com/scriptdev2/scriptdev2/commit/fce8d293c258c8f1598ec79ccde4cd6a643f0403#commitcomment-11015878
Required temp gameobject for spellfocus cast spell.

ID - 31116 Вызов ночной Погибели
=================================================
Description: Вызов Ночной Погибели в южной части Террасы Мастера.

Category = 0, SpellIconID = 1, activeIconID = 0, SpellVisual = (703,0)
Family SPELLFAMILY_GENERIC, flag [0] 0x00000000 [1] 0x00000000 [2] 0x00000000 [3] 0x00000000

SpellSchoolMask = 1 (SPELL_SCHOOL_MASK_NORMAL)
DamageClass = 0 (SPELL_DAMAGE_CLASS_NONE)
PreventionType = 0 (SPELL_PREVENTION_TYPE_NONE)
=================================================
Attributes: 0x00000100 (SPELL_ATTR0_HIDE_IN_COMBAT_LOG)
=================================================
Spell Level = 0, base 0, max 0

Category = 0
DispelType = 0 (DISPEL_NONE)
Mechanic = 0 (MECHANIC_NONE)
SpellRange: (Id 7) "Ten yards":
    MinRangeNegative = 0, MinRangePositive = 0
    MaxRangeNegative = 10, MaxRangePositive = 10

Cast time (Id 4) = 1,00

Interrupt Flags: 0x0000000F, AuraIF 0x00000000, ChannelIF 0x00000000
Requires Spell Focus 1383
Chance = 0, charges - 0
=================================================
Effect 0: Id 61 (SPELL_EFFECT_SEND_EVENT) DIFFICULTY_NONE
BasePoints = 0
Targets (0, 0) (NO_TARGET, NO_TARGET)
EffectMiscValueA = 10591

Spell Focus 1383 = Gameobject id 300073.
Add and happy's!

Summon @tkrokli
Summon @Aokromes
Summon @boriscom
Summon @AnTOLI
Summon @dr-j
Summon @Exodius
Summon @peycho

Summon all.

WTF ?
This boss needs scripts...
Sirikfoll rewriting/writing scripts for it

the proper spell focus is 181958.

@Aokromes
181958 yes - have data spellfocus, but 300073 also can be have spellfocus. Maybe for Image Medivh summon? Master Terrace Door.
scriptdev2/scriptdev2@fce8d29#commitcomment-11015878
I think, information from sniff also.

@Shauren add Branch Master label please too. Because Old Karazhan not deleted in Legion.

300073 is a custom mangos GO, it don't exists on tc.

-- Image of Arcanagos SAI
SET @ENTRY := 17652;
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY;
DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(@ENTRY,0,0,0,25,0,100,0,0,0,0,0,59,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Arcanagos - On Reset - Set Run On"),
(@ENTRY,0,1,0,25,0,100,0,0,0,0,0,60,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Arcanagos - On Reset - Set Fly On"),
(@ENTRY,0,2,0,25,0,100,0,0,0,0,0,90,2,3,0,0,0,0,1,0,0,0,0,0,0,0,"Image of Arcanagos - On Reset - Set Flag Hover");

For correct fly animations.

@Aokromes custom? Hacking go?

Yes, this was fixed here.

Yes, thanks for explain.

On current state you cannot use urn even if complete required quest's.

// Spell scripted event for 31116.
class spell_karazhan_event_spell_summon_nightbane : public SpellScriptLoader
{
    public:
        spell_karazhan_event_spell_summon_nightbane() : SpellScriptLoader("spell_karazhan_event_spell_summon_nightbane") { }

        class spell_karazhan_event_spell_summon_nightbane_SpellScript : public SpellScript
        {
            PrepareSpellScript(spell_karazhan_event_spell_summon_nightbane_SpellScript);

            void HandleEvent(SpellEffIndex effIndex)
            {
                PreventHitDefaultEffect(effIndex);

                if (Creature* nightbane = GetCaster()->FindNearestCreature(17225, 375.0f))
                {
                    if (nightbane->IsAlive())
                    {
                        nightbane->AI()->Talk(EMOTE_SUMMON);
                        nightbane->SetStandState(UNIT_STAND_STATE_STAND);
                        nightbane->SetDisableGravity(true);
                        nightbane->SetCanFly(true);
                        nightbane->SetDisableGravity(true);
                        nightbane->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
                        nightbane->SetHover(true);
                        nightbane->GetMotionMaster()->Clear(false);
                        nightbane->GetMotionMaster()->MovePoint(0, IntroWay[0][0], IntroWay[0][1], IntroWay[0][2]);
                    }
                }
            }

            void Register() override
            {
                OnEffectHit += SpellEffectFn(spell_karazhan_event_spell_summon_nightbane_SpellScript::HandleEvent, EFFECT_0, SPELL_EFFECT_SEND_EVENT);
            }
        };

        SpellScript* GetSpellScript() const override
        {
            return new spell_karazhan_event_spell_summon_nightbane_SpellScript();
        }
};

Maybe this? For start event. And remove code commenting for wait timer?

Hack :)
this part:

                        nightbane->AI()->Talk(EMOTE_SUMMON);
                        nightbane->SetStandState(UNIT_STAND_STATE_STAND);
                        nightbane->SetDisableGravity(true);
                        nightbane->SetCanFly(true);
                        nightbane->SetDisableGravity(true);
                        nightbane->SetByteFlag(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
                        nightbane->SetHover(true);
                        nightbane->GetMotionMaster()->Clear(false);
                        nightbane->GetMotionMaster()->MovePoint(0, IntroWay[0][0], IntroWay[0][1], IntroWay[0][2]);

should be in nightbane script
spell should only set a action to nightbane start
Sirikfoll should rewrite this boss, but he lost sniffs about it xdd

You Skeram "fix" also hack and what?
See Mangos script from "sniff". Or you think, what only you sniff right?
You brought just wasted that person.

Because no one ever understands what you're saying

1) His fix Skeram - the same hack.
2) Mangos have scripted Nightbane also from sniff. But he is think, what only his sniff = true.

Nop, because talk to you is a waste of time.

Well continue to push your hacks. Go on. Like edit crash after them - continue.

don't be so rude please. do you actually ever saw a spellscript in tc that activates manually a path for a creature? i never saw such stuff. Best would be to set an action from the gameobject to the creature, and the creature handles the rest.

sth. like

class go_blackened_urn : public GameObjectScript
{
    public:
        go_blackened_urn() : GameObjectScript("go_blackened_urn") { }

        bool OnGossipHello(Player* player, GameObject* go) override
        {
            if (InstanceScript* instance = go->GetInstanceScript())
                if (Creature* nightbane = ObjectAccessor::GetCreature(*go, instance->GetGuidData(DATA_NIGHTBANE)))
                    nightbane->AI()->DoAction(ACTION_START_INTRO);
            go->SendUpdateToPlayer(player);
            return true;
        }
    };
};

and then in the nightbane AI itself:

            void DoAction(int32 param) override
            {
                if (param == ACTION_START_INTRO && instance && instance->GetBossState(DATA_NIGHTBANE) == NOT_STARTED) // Blackened Urn activated
                {
                    Intro = true;
                    Flying = false;
                    WaypointReached = true;
                    me->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
                    me->SetCanFly(true);
                    me->SetDisableGravity(true);
                    me->SetStandState(UNIT_STAND_STATE_STAND);
                    me->setActive(true);
                    me->SetWalk(false);
                    HandleTerraceDoors(false);

                    me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);

                    instance->SetBossState(DATA_NIGHTBANE, IN_PROGRESS);
                }
            }

@Rushor Krudor will sniff this fight and Sirikfoll will rewrite everything.
Btw, thanks ^^

OnGossipHello?
Go use should be, no?

@Rushor

                        nightbane->GetMotionMaster()->MovePoint(0, IntroWay[0][0], IntroWay[0][1], IntroWay[0][2]);

Can be replaced on:

nightbane->AI()->SetData(1, 1);

yes nevertheless dataset/actionstart from go to npc is smarter instead of dataset/actionstart from spell to npc. But as already said, discussing this here is useless. Sirikfoll will rewrite it, maybe opens up a pr and then you can comment on this :)

Anyone have an old sniff of this boss? Currently the quest requirement no longer exists, so I can't verify if the spell http://www.wowhead.com/spell=31116/summon-nightbane used to be used before Legion launch(currently it is not used)

no match of that spell id on any sniff. Some 4.3.x sniffs exist for this mob.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

funjoker picture funjoker  ·  3Comments

Keader picture Keader  ·  3Comments

Jonne733 picture Jonne733  ·  3Comments

Blasphemous picture Blasphemous  ·  3Comments

Jildor picture Jildor  ·  3Comments