Jump to content
  • Engineering -Explosive Sheep BUG


    mpfans
    • Status: Confirmed
      Main Category: Database
      Sub-Category: Item Handling
      Version: 21.11 Milestone: Unset Priority: New
      Implemented Version: 0.20

    Engineering -Explosive Sheep BUG

    Summons an Explosive Sheep which will charge at a nearby enemy and explode for 135 to 165 damage.


    but Explosive Sheep don't Explosive


    User Feedback

    Recommended Comments

    /*
     * Explosive Sheep
     */
    
    enum
    {
        SPELL_EXPLOSIVE_SHEEP_PASSIVE   = 4051,
        SPELL_EXPLOSIVE_SHEEP           = 4050
    };
    
    struct npc_explosive_sheepAI : ScriptedPetAI
    {
        explicit npc_explosive_sheepAI(Creature* pCreature) : ScriptedPetAI(pCreature)
        {
            m_creature->SetCanModifyStats(true);
    
            if (m_creature->GetCharmInfo())
                m_creature->GetCharmInfo()->SetReactState(REACT_AGGRESSIVE);
    
            npc_explosive_sheepAI::Reset();
            npc_explosive_sheepAI::ResetCreature();
        }
    
        bool m_bExploded;
        uint32 m_uiAliveTimer;
    
        void Reset() override
        {
    
        }
    
        void ResetCreature() override
        {
            m_bExploded = false;
            m_uiAliveTimer = 3 * MINUTE * IN_MILLISECONDS;
    
            m_creature->CastSpell(m_creature, SPELL_EXPLOSIVE_SHEEP_PASSIVE, true);
        }
    
        void JustDied(Unit* /*pKiller*/) override
        {
            if (auto pPet = m_creature->ToPet())
                pPet->DelayedUnsummon(5000, PET_SAVE_AS_DELETED);
        }
    
        void UpdateAI(const uint32 uiDiff) override
        {
            if (!m_bExploded)
            {
                if (m_uiAliveTimer <= uiDiff)
                {
                    m_creature->CastSpell(m_creature, SPELL_EXPLOSIVE_SHEEP, true);
                    m_bExploded = true;
                }
                else
                    m_uiAliveTimer -= uiDiff;
    
                ScriptedPetAI::UpdateAI(uiDiff);
            }
        }
    };
    
    CreatureAI* GetAI_npc_explosive_sheep(Creature* pCreature)
    {
        return new npc_explosive_sheepAI(pCreature);
    }
    
    newscript = new Script;
    newscript->Name = "npc_explosive_sheep";
    newscript->GetAI = &GetAI_npc_explosive_sheep;
    newscript->RegisterSelf();

    This is what can be found within elysium core.

    Link to comment
    Share on other sites



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use