Obsidian Sanctum: Many improvements & fixes, by moriquendu

Closes issue #1278
Closes issue #2505
Finally I make some time to review & push this change. Thanks for the patience

--HG--
branch : trunk
This commit is contained in:
Tartalo
2010-06-30 19:02:20 +02:00
parent 0a5a30a592
commit fe1caeefc0
4 changed files with 475 additions and 140 deletions

View File

@@ -0,0 +1,5 @@
-- Limit Flame Tsunami buff to Lava Blazes only
DELETE FROM spell_script_target WHERE entry = 60430;
INSERT INTO spell_script_target (entry, type, targetEntry) VALUES
(60430, 1, 30643),
(60430, 1, 31317);

View File

@@ -1,3 +1,19 @@
/* Copyright (C) 2009 - 2010 TrinityCore <http://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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "ScriptPCH.h"
#include "obsidian_sanctum.h"
@@ -17,6 +33,10 @@ struct instance_obsidian_sanctum : public ScriptedInstance
uint64 m_uiShadronGUID;
uint64 m_uiVesperonGUID;
bool m_bTenebronKilled;
bool m_bShadronKilled;
bool m_bVesperonKilled;
void Initialize()
{
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
@@ -25,6 +45,10 @@ struct instance_obsidian_sanctum : public ScriptedInstance
m_uiTenebronGUID = 0;
m_uiShadronGUID = 0;
m_uiVesperonGUID = 0;
m_bTenebronKilled = false;
m_bShadronKilled = false;
m_bVesperonKilled = false;
}
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
@@ -55,12 +79,24 @@ struct instance_obsidian_sanctum : public ScriptedInstance
{
if (uiType == TYPE_SARTHARION_EVENT)
m_auiEncounter[0] = uiData;
else if(uiType == TYPE_TENEBRON_PREKILLED)
m_bTenebronKilled = true;
else if(uiType == TYPE_SHADRON_PREKILLED)
m_bShadronKilled = true;
else if(uiType == TYPE_VESPERON_PREKILLED)
m_bVesperonKilled = true;
}
uint32 GetData(uint32 uiType)
{
if (uiType == TYPE_SARTHARION_EVENT)
return m_auiEncounter[0];
else if(uiType == TYPE_TENEBRON_PREKILLED)
return m_bTenebronKilled;
else if(uiType == TYPE_SHADRON_PREKILLED)
return m_bShadronKilled;
else if(uiType == TYPE_VESPERON_PREKILLED)
return m_bVesperonKilled;
return 0;
}

View File

@@ -1,9 +1,28 @@
/* Copyright (C) 2009 - 2010 TrinityCore <http://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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef DEF_OBSIDIAN_SANCTUM_H
#define DEF_OBSIDIAN_SANCTUM_H
enum eTypes
{
TYPE_SARTHARION_EVENT = 1,
TYPE_TENEBRON_PREKILLED = 2,
TYPE_SHADRON_PREKILLED = 3,
TYPE_VESPERON_PREKILLED = 4,
DATA_SARTHARION = 10,
DATA_TENEBRON = 11,