Scripts/TotT: prepare instance for future implementations

This commit is contained in:
Ovahlord
2018-08-05 22:39:03 +02:00
parent 072cc4d043
commit b0e266c3dc
9 changed files with 286 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
UPDATE `creature_addon` SET `auras`= '' WHERE `guid`= 255068;
UPDATE `creature_addon` SET `auras`= '' WHERE `guid` IN
(254870, 254871, 254872, 254873, 254875, 254877, 254878, 254879, 254881, 254884, 254885, 254888, 254892, 254893, 254894, 254895, 254896, 254897, 254898, 254899, 254900, 254901, 254902, 254903, 254904, 254905, 254906, 254907, 254908, 254909, 254910, 254911, 254912, 254913, 254916, 254919, 254886, 254891, 255406);
UPDATE `creature_template` SET `InhabitType`= 4 WHERE `entry` IN (44581, 49100, 49101, 45030, 44566, 49097, 45672, 45621, 40655, 49096);
DELETE FROM `creature` WHERE `guid`= 255406;
DELETE FROM `creature_addon` WHERE `guid`= 255406;
UPDATE `instance_template` SET `script`= 'instance_throne_of_the_tides' WHERE `map`= 643;
UPDATE `creature_template` SET `flags_extra`= 128 WHERE `entry` IN (45030, 49101, 44581, 49100);

View File

@@ -0,0 +1,20 @@
/*
* Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
void AddSC_boss_commander_ulthok()
{
}

View File

@@ -0,0 +1,20 @@
/*
* Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
void AddSC_boss_lady_nazjar()
{
}

View File

@@ -0,0 +1,20 @@
/*
* Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
void AddSC_boss_mindbender_gursha()
{
}

View File

@@ -0,0 +1,20 @@
/*
* Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
void AddSC_boss_ozumat()
{
}

View File

@@ -0,0 +1,105 @@
/*
* Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ScriptMgr.h"
#include "throne_of_the_tides.h"
#include "InstanceScript.h"
#include "Vehicle.h"
ObjectData const creatureData[] =
{
{ BOSS_LADY_NAZJAR, DATA_LADY_NAZJAR },
{ BOSS_COMMANDER_ULTHOK, DATA_COMMANDER_ULTHOK },
{ BOSS_MINDBENDER_GURSHA, DATA_MINDBENDER_GURSHA },
{ BOSS_OZUMAT, DATA_OZUMAT },
{ 0, 0 } // END
};
class instance_throne_of_the_tides : public InstanceMapScript
{
public:
instance_throne_of_the_tides(): InstanceMapScript(TotTScriptName, 643) { }
struct instance_throne_of_the_tides_InstanceMapScript : public InstanceScript
{
instance_throne_of_the_tides_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
{
Initialize();
SetHeaders(DataHeader);
SetBossNumber(EncounterCount);
LoadObjectData(creatureData, nullptr);
}
void Initialize()
{
}
bool SetBossState(uint32 type, EncounterState state) override
{
if (!InstanceScript::SetBossState(type, state))
return false;
return true;
}
void OnCreatureCreate(Creature* creature) override
{
InstanceScript::OnCreatureCreate(creature);
switch (creature->GetEntry())
{
case BOSS_OZUMAT:
case NPC_OZUMAT_VEHICLE:
case NPC_OZUMAT_VEHICLE_BIG:
creature->setActive(true);
creature->SetFarVisible(true);
break;
default:
break;
}
}
uint32 GetData(uint32 type) const override
{
return 0;
}
void SetData(uint32 type, uint32 data) override
{
}
void WriteSaveDataMore(std::ostringstream& data) override
{
}
void ReadSaveDataMore(std::istringstream& data) override
{
}
private:
};
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{
return new instance_throne_of_the_tides_InstanceMapScript(map);
}
};
void AddSC_instance_throne_of_the_tides()
{
new instance_throne_of_the_tides();
}

View File

@@ -0,0 +1,20 @@
/*
* Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
void AddSC_throne_of_the_tides()
{
}

View File

@@ -0,0 +1,58 @@
/*
* Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef THRONEOFTHETIDES_H_
#define THRONEOFTHETIDES_H_
#include "CreatureAIImpl.h"
#define TotTScriptName "instance_throne_of_the_tides"
#define DataHeader "TOTT"
uint32 const EncounterCount = 4;
enum TotTDataTypes
{
// Encounters
DATA_LADY_NAZJAR = 0,
DATA_COMMANDER_ULTHOK = 1,
DATA_MINDBENDER_GURSHA = 2,
DATA_OZUMAT = 3
};
enum TotTCreatureIds
{
// Bosses
BOSS_LADY_NAZJAR = 40586,
BOSS_COMMANDER_ULTHOK = 40765,
BOSS_MINDBENDER_GURSHA = 40788,
BOSS_OZUMAT = 40655,
// Event Creatures
NPC_OZUMAT_VEHICLE_BIG = 45030,
NPC_OZUMAT_VEHICLE = 44581
};
template <class AI, class T>
inline AI* GetThroneOfTheTodesAI(T* obj)
{
return GetInstanceAI<AI>(obj, TotTScriptName);
}
#define RegisterThroneOfTheTidesCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetThroneOfTheTodesAI)
#endif // THRONEOFTHETIDES_H_

View File

@@ -179,6 +179,12 @@ void AddSC_boss_eredar_twins();
void AddSC_boss_muru();
void AddSC_boss_kiljaeden();
void AddSC_sunwell_plateau();
void AddSC_throne_of_the_tides(); // Throne of the Tides
void AddSC_instance_throne_of_the_tides();
void AddSC_boss_lady_nazjar();
void AddSC_boss_commander_ulthok();
void AddSC_boss_mindbender_gursha();
void AddSC_boss_ozumat();
void AddSC_boss_archaedas(); //Uldaman
void AddSC_boss_ironaya();
void AddSC_uldaman();
@@ -398,6 +404,12 @@ void AddEasternKingdomsScripts()
AddSC_boss_hogger();
AddSC_boss_randolph_moloch();
AddSC_boss_lord_overheat();
AddSC_throne_of_the_tides(); // Throne of the Tides
AddSC_instance_throne_of_the_tides();
AddSC_boss_lady_nazjar();
AddSC_boss_commander_ulthok();
AddSC_boss_mindbender_gursha();
AddSC_boss_ozumat();
AddSC_boss_archaedas(); //Uldaman
AddSC_boss_ironaya();
AddSC_uldaman();