Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.87 KB | None | 0 0
  1. diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
  2. index 21169f56bc..b13aa8b514 100644
  3. --- a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
  4. +++ b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp
  5. @@ -55,6 +55,21 @@ class instance_zulgurub : public InstanceMapScript
  6.                  return false;
  7.              }
  8.  
  9. +            bool SetBossState(uint32 type, EncounterState state) override
  10. +            {
  11. +                if (!InstanceScript::SetBossState(type, state))
  12. +                    return false;
  13. +
  14. +                if (type == DATA_MARLI && state == FAIL /* or whatever boss state you want */)
  15. +                {
  16. +                    for (auto && guid : eggs)
  17. +                    {
  18. +                        if (GameObject* go = instance->GetGameObject(guid))
  19. +                            go->Respawn();
  20. +                    }
  21. +                }
  22. +            }
  23. +
  24.              void OnCreatureCreate(Creature* creature) override
  25.              {
  26.                  switch (creature->GetEntry())
  27. @@ -93,6 +108,9 @@ class instance_zulgurub : public InstanceMapScript
  28.                          else
  29.                              go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
  30.                          break;
  31. +                    case 179985:
  32. +                        eggs.push_back(go->GetGUID());
  33. +                        break;
  34.                      default:
  35.                          break;
  36.                  }
  37. @@ -135,6 +153,7 @@ class instance_zulgurub : public InstanceMapScript
  38.              ObjectGuid _vilebranchSpeakerGUID;
  39.              ObjectGuid _arlokkGUID;
  40.              ObjectGuid _goGongOfBethekkGUID;
  41. +            GuidVector eggs;
  42.          };
  43.  
  44.          InstanceScript* GetInstanceScript(InstanceMap* map) const override
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement