cmangos / issues

This repository is used as a centralized point for all issues regarding CMaNGOS.
179 stars 47 forks source link

[WOTLK] Lord Marrowgar - Bone Spike Despawning #790

Open Rushor opened 8 years ago

Rushor commented 8 years ago

https://github.com/cmangos/mangos-wotlk/blob/master/src/scriptdev2/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp#L124

After Death all Bonespikes must be despawned, sometimes it fails to despawn them, so a manual check could help here

            void BoneSpikeDespawn()
            {
                std::list<Creature*> BonespikeList;
                me->GetCreatureListWithEntryInGrid(BonespikeList, NPC_BONE_SPIKE, 200.0f);
                if (!BonespikeList.empty())
                    for (std::list<Creature*>::iterator itr = BonespikeList.begin(); itr != BonespikeList.end(); itr++)
                    {
                        // vehicle id 533 has only seat 0
                        if (Vehicle* vehicle = (*itr)->GetVehicleKit())
                            if (Unit* passenger = vehicle->GetPassenger(0))
                            {
                                passenger->RemoveAurasDueToSpell(SPELL_IMPALED);
                                passenger->ExitVehicle();
                            }

                        (*itr)->DespawnOrUnsummon();
                    }
            }
ghost commented 8 years ago

Creature linking can help - Can add combinate DESPAWN_ON_EVADE, DESPAWN_ON_DESPAWN, DESPAWN_ON_DEATH.

DELETE FROM creature_linking_template WHERE entry IN (36619,38711,38712,36672);
INSERT INTO creature_linking_template (entry,map,master_entry,flag,search_range) VALUES
(36619,631,36612,4112,0),
(38711,631,36612,4112,0),
(38712,631,36612,4112,0),
(36672,631,36612,4112,0);