LegionCore-7.3.5 icon indicating copy to clipboard operation
LegionCore-7.3.5 copied to clipboard

Argus chest

Open Fragrus opened this issue 5 years ago • 9 comments

Loot chest no longer appears after killing Argus. Help pls )

Fragrus avatar Oct 27 '20 09:10 Fragrus

There is a chest in GM mode

Fragrus avatar Oct 27 '20 09:10 Fragrus

You would have to provide far more information for me to work with. What is the issue exactly, and should it work? Preferably with some sources on how it should work.

dufernst avatar Oct 28 '20 00:10 dufernst

https://github.com/dufernst/LegionCore-7.3.5/blob/master/src/server/scripts/Legion/AntorusTheBurningThrone/boss_argus.cpp line 339

this check does not work and the time is not set for the chest chest->SetRespawnTime(86400);

Fragrus avatar Oct 28 '20 00:10 Fragrus

If you would be able to create a pull request with a fix for this then I can look at it and merge it. Otherwise it will have to wait till I have time for it, which might take a couple of months at my current pace :P

dufernst avatar Oct 28 '20 08:10 dufernst

https://github.com/dufernst/LegionCore-7.3.5/blob/master/src/server/scripts/Legion/AntorusTheBurningThrone/boss_argus.cpp line 339

this check does not work and the time is not set for the chest chest->SetRespawnTime(86400);


void JustDied(Unit* /*killer*/) override
    {
        _JustDied();
        RemoveDebuffs();
        SetVisibleTeleporter(true);

        me->GetMap()->LoadGrid(3092.1f, -9635.22f);

        me->AddDelayedEvent(1000, [this]() -> void
        {
            instance->DoCastSpellOnPlayers(SPELL_OUTRO);

            instance->instance->ApplyOnEveryPlayer([&](Player* player)
            {
                if (me->GetThreatTarget(player->GetGUID()))
                {
                    me->CastSpell(player, SPELL_ARGUS_BONUS_ROLL, true);
                    player->CastSpell(player, SPELL_DAILY_ESSENCE_ARGUS, true);
                    me->SummonGameObject(GO_ARGUS_CHEST, 3089.37f, -9635.28f, 70.3764f, 0.0286093f, 0, 0, 0, 0, 86400);
                }

                player->NearTeleportTo(3112.587f, -9635.071f, 62.3f, player->GetOrientation());
            });
            if (auto chest = instance->instance->GetGameObject(instance->GetGuidData(GO_ARGUS_CHEST)))
                chest->SetRespawnTime(86400);
                

        });
    }

Elgrimm avatar Feb 02 '22 16:02 Elgrimm

me->SummonGameObject(GO_ARGUS_CHEST, 3089.37f, -9635.28f, 70.3764f, 0.0286093f, 0, 0, 0, 0, 86400); Do this.

Elgrimm avatar Feb 02 '22 16:02 Elgrimm

@Elgrimm looks like you are summoning one chest for each player.

dufernst avatar Feb 02 '22 16:02 dufernst

So it is, if you apply this code, it will cause a chest for each player)

Fragrus avatar Feb 02 '22 18:02 Fragrus

Well not spawning a chest for each player is at least easy to fix. But I don't like this way of fixing it to begin with. But if you want you could use this as a temporary workaround:


void JustDied(Unit* /*killer*/) override
    {
        _JustDied();
        RemoveDebuffs();
        SetVisibleTeleporter(true);

        me->GetMap()->LoadGrid(3092.1f, -9635.22f);

        me->AddDelayedEvent(1000, [this]() -> void
        {
            instance->DoCastSpellOnPlayers(SPELL_OUTRO);

            instance->instance->ApplyOnEveryPlayer([&](Player* player)
            {
                if (me->GetThreatTarget(player->GetGUID()))
                {
                    me->CastSpell(player, SPELL_ARGUS_BONUS_ROLL, true);
                    player->CastSpell(player, SPELL_DAILY_ESSENCE_ARGUS, true);
                }

                player->NearTeleportTo(3112.587f, -9635.071f, 62.3f, player->GetOrientation());
            });

            me->SummonGameObject(GO_ARGUS_CHEST, 3089.37f, -9635.28f, 70.3764f, 0.0286093f, 0, 0, 0, 0, 86400);
            if (auto chest = instance->instance->GetGameObject(instance->GetGuidData(GO_ARGUS_CHEST)))
                chest->SetRespawnTime(86400);
                

        });
    }

dufernst avatar Feb 02 '22 19:02 dufernst