Gundrak: Code cleansing

--HG--
branch : trunk
This commit is contained in:
Tartalo
2010-03-22 22:36:26 +01:00
parent df45e38ba6
commit 0d1bd05ce7
6 changed files with 138 additions and 104 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
* 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
@@ -16,33 +16,24 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* Script Data Start
SDName: Boss Drakkari Colossus
SDAuthor: Manuel
SD%Complete: 95 %
SDComment: The event with the Living Mojos is not implemented, just is done that when one of the mojos around the boss take damage will make the boss enter in combat!
SDCategory:
Script Data End */
/*
* Comment: The event with the Living Mojos is not implemented, just is done that when one of the mojos around the boss take damage will make the boss enter in combat!
*/
#include "ScriptedPch.h"
#include "gundrak.h"
enum Spells
{
SPELL_EMERGE = 54850,
SPELL_MIGHTY_BLOW = 54719,
SPELL_MERGE = 54878,
SPELL_SURGE = 54801,
SPELL_FREEZE_ANIM = 16245,
SPELL_MOJO_PUDDLE = 55627,
H_SPELL_MOJO_PUDDLE = 58994,
SPELL_MOJO_WAVE = 55626,
H_SPELL_MOJO_WAVE = 58993
SPELL_EMERGE = 54850,
SPELL_MIGHTY_BLOW = 54719,
SPELL_MERGE = 54878,
SPELL_SURGE = 54801,
SPELL_FREEZE_ANIM = 16245,
SPELL_MOJO_PUDDLE = 55627,
H_SPELL_MOJO_PUDDLE = 58994,
SPELL_MOJO_WAVE = 55626,
H_SPELL_MOJO_WAVE = 58993
};
struct boss_drakkari_colossusAI : public ScriptedAI

View File

@@ -1,14 +1,21 @@
/* Script Data Start
SDName: Boss Eck the Ferocious
SDAuthor: LordVanMartin
SD%Complete:
SDComment: Only appears in Heroic mode
SDCategory:
Script Data End */
/*
* 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
*/
/*** SQL START ***
update creature_template set scriptname = '' where entry = '';
*** SQL END ***/
#include "ScriptedPch.h"
#include "gundrak.h"

View File

@@ -1,27 +1,35 @@
/* Script Data Start
SDName: Boss moorabi
SDAuthor: Manuel
SD%Complete: 100%
SDComment: Maybe needs better timers.
SDCategory: Gundrak
Script Data End */
/*
* 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 "ScriptedPch.h"
#include "gundrak.h"
enum eSpells
{
SPELL_DETERMINED_STAB = 55104,
SPELL_GROUND_TREMOR = 55142,
SPELL_NUMBING_SHOUT = 55106,
SPELL_DETERMINED_GORE = 55102,
SPELL_DETERMINED_GORE_1 = 59444,
SPELL_QUAKE = 55101,
SPELL_NUMBING_ROAR = 55100,
SPELL_MOJO_FRENZY = 55163,
SPELL_TRANSFORMATION = 55098, //Periodic, The caster transforms into a powerful mammoth, increasing Physical damage done by 25% and granting immunity to Stun effects.
SPELL_DETERMINED_STAB = 55104,
SPELL_GROUND_TREMOR = 55142,
SPELL_NUMBING_SHOUT = 55106,
SPELL_DETERMINED_GORE = 55102,
SPELL_DETERMINED_GORE_1 = 59444,
SPELL_QUAKE = 55101,
SPELL_NUMBING_ROAR = 55100,
SPELL_MOJO_FRENZY = 55163,
SPELL_TRANSFORMATION = 55098, //Periodic, The caster transforms into a powerful mammoth, increasing Physical damage done by 25% and granting immunity to Stun effects.
};
enum eArchivements
@@ -133,23 +141,13 @@ struct boss_moorabiAI : public ScriptedAI
{
DoScriptText(SAY_DEATH, m_creature);
if (IsHeroic() && !bPhase)
{
AchievementEntry const *AchievLessRabi = GetAchievementStore()->LookupEntry(ACHIEVEMENT_LESS_RABI);
if (AchievLessRabi)
{
Map* pMap = m_creature->GetMap();
if (pMap && pMap->IsDungeon())
{
Map::PlayerList const &players = pMap->GetPlayers();
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievLessRabi);
}
}
}
if (pInstance)
{
pInstance->SetData(DATA_MOORABI_EVENT, DONE);
if (IsHeroic() && !bPhase)
pInstance->DoCompleteAchievement(ACHIEVEMENT_LESS_RABI);
}
}
void KilledUnit(Unit* pVictim)

View File

@@ -1,62 +1,63 @@
/* Script Data Start
SDName: Boss slad_ran
SDAuthor: LordVanMartin
SD%Complete:
SDComment:
SDCategory:
Script Data End */
/*
* 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
*/
/*** SQL START ***
update creature_template set scriptname = 'boss_slad_ran' where entry = '';
*** SQL END ***/
#include "ScriptedPch.h"
#include "gundrak.h"
//Spells
enum Spells
{
SPELL_POISON_NOVA = 55081,
H_SPELL_POISON_NOVA = 59842,
SPELL_POWERFULL_BITE = 48287,
H_SPELL_POWERFULL_BITE = 59840,
SPELL_VENOM_BOLT = 54970,
H_SPELL_VENOM_BOLT = 59839
SPELL_POISON_NOVA = 55081,
H_SPELL_POISON_NOVA = 59842,
SPELL_POWERFULL_BITE = 48287,
H_SPELL_POWERFULL_BITE = 59840,
SPELL_VENOM_BOLT = 54970,
H_SPELL_VENOM_BOLT = 59839
};
//Yell
enum Yells
{
SAY_AGGRO = -1604017,
SAY_SLAY_1 = -1604018,
SAY_SLAY_2 = -1604019,
SAY_SLAY_3 = -1604020,
SAY_DEATH = -1604021,
SAY_SUMMON_SNAKES = -1604022,
SAY_SUMMON_CONSTRICTORS = -1604023
SAY_AGGRO = -1604017,
SAY_SLAY_1 = -1604018,
SAY_SLAY_2 = -1604019,
SAY_SLAY_3 = -1604020,
SAY_DEATH = -1604021,
SAY_SUMMON_SNAKES = -1604022,
SAY_SUMMON_CONSTRICTORS = -1604023
};
//Creatures
enum Creatures
{
CREATURE_SNAKE = 29680,
CREATURE_CONSTRICTORS = 29713
CREATURE_SNAKE = 29680,
CREATURE_CONSTRICTORS = 29713
};
//Creatures' spells
enum ConstrictorSpells
{
SPELL_GRIP_OF_SLAD_RAN = 55093,
SPELL_VENOMOUS_BITE = 54987,
H_SPELL_VENOMOUS_BITE = 58996
SPELL_GRIP_OF_SLAD_RAN = 55093,
SPELL_VENOMOUS_BITE = 54987,
H_SPELL_VENOMOUS_BITE = 58996
};
// Spawning locations
struct Locations
{
float x, y, z, orientation;
};
static Locations SpawnLoc[]=
static Position SpawnLoc[]=
{
{1783.81, 646.637, 133.948, 3.71755},
{1775.03, 606.586, 134.165, 1.43117},
@@ -135,20 +136,21 @@ struct boss_slad_ranAI : public ScriptedAI
{
if (uiPhase == 1)
for (uint8 i = 0; i < DUNGEON_MODE(3, 5); ++i)
m_creature->SummonCreature(CREATURE_SNAKE, SpawnLoc[i].x, SpawnLoc[i].y, SpawnLoc[i].z, SpawnLoc[i].orientation, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
m_creature->SummonCreature(CREATURE_SNAKE, SpawnLoc[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
if (uiPhase == 2)
for (uint8 i = 0; i < DUNGEON_MODE(3, 5); ++i)
m_creature->SummonCreature(CREATURE_CONSTRICTORS, SpawnLoc[i].x, SpawnLoc[i].y, SpawnLoc[i].z, SpawnLoc[i].orientation, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
m_creature->SummonCreature(CREATURE_CONSTRICTORS, SpawnLoc[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
uiSpawnTimer = 5000;
} else uiSpawnTimer -= diff;
}
if ((uiPhase == 0) && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 30)
if (uiPhase == 0 && HealthBelowPct(30))
{
DoScriptText(SAY_SUMMON_SNAKES,m_creature);
uiPhase = 1;
}
if ((uiPhase == 1) && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25)
if (uiPhase == 1 && HealthBelowPct(25))
{
DoScriptText(SAY_SUMMON_CONSTRICTORS,m_creature);
uiPhase = 2;

View File

@@ -1,3 +1,21 @@
/*
* 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_GUNDRAK_H
#define DEF_GUNDRAK_H

View File

@@ -1,3 +1,21 @@
/*
* 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 "ScriptedPch.h"
#include "gundrak.h"