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
@@ -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 * 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 * it under the terms of the GNU General Public License as published by
@@ -16,13 +16,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* Script Data Start /*
SDName: Boss Drakkari Colossus * 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!
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 */
#include "ScriptedPch.h" #include "ScriptedPch.h"
#include "gundrak.h" #include "gundrak.h"
@@ -30,17 +26,12 @@ Script Data End */
enum Spells enum Spells
{ {
SPELL_EMERGE = 54850, SPELL_EMERGE = 54850,
SPELL_MIGHTY_BLOW = 54719, SPELL_MIGHTY_BLOW = 54719,
SPELL_MERGE = 54878, SPELL_MERGE = 54878,
SPELL_SURGE = 54801, SPELL_SURGE = 54801,
SPELL_FREEZE_ANIM = 16245, SPELL_FREEZE_ANIM = 16245,
SPELL_MOJO_PUDDLE = 55627, SPELL_MOJO_PUDDLE = 55627,
H_SPELL_MOJO_PUDDLE = 58994, H_SPELL_MOJO_PUDDLE = 58994,
SPELL_MOJO_WAVE = 55626, SPELL_MOJO_WAVE = 55626,
H_SPELL_MOJO_WAVE = 58993 H_SPELL_MOJO_WAVE = 58993
}; };
+17 -10
View File
@@ -1,14 +1,21 @@
/* Script Data Start /*
SDName: Boss Eck the Ferocious * Copyright (C) 2009-2010 TrinityCore <http://www.trinitycore.org/>
SDAuthor: LordVanMartin *
SD%Complete: * This program is free software; you can redistribute it and/or modify
SDComment: Only appears in Heroic mode * it under the terms of the GNU General Public License as published by
SDCategory: * the Free Software Foundation; either version 2 of the License, or
Script Data End */ * (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 "ScriptedPch.h"
#include "gundrak.h" #include "gundrak.h"
+22 -24
View File
@@ -1,10 +1,20 @@
/* Script Data Start /*
SDName: Boss moorabi * Copyright (C) 2009-2010 TrinityCore <http://www.trinitycore.org/>
SDAuthor: Manuel *
SD%Complete: 100% * This program is free software; you can redistribute it and/or modify
SDComment: Maybe needs better timers. * it under the terms of the GNU General Public License as published by
SDCategory: Gundrak * the Free Software Foundation; either version 2 of the License, or
Script Data End */ * (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 "ScriptedPch.h"
#include "gundrak.h" #include "gundrak.h"
@@ -14,12 +24,10 @@ enum eSpells
SPELL_DETERMINED_STAB = 55104, SPELL_DETERMINED_STAB = 55104,
SPELL_GROUND_TREMOR = 55142, SPELL_GROUND_TREMOR = 55142,
SPELL_NUMBING_SHOUT = 55106, SPELL_NUMBING_SHOUT = 55106,
SPELL_DETERMINED_GORE = 55102, SPELL_DETERMINED_GORE = 55102,
SPELL_DETERMINED_GORE_1 = 59444, SPELL_DETERMINED_GORE_1 = 59444,
SPELL_QUAKE = 55101, SPELL_QUAKE = 55101,
SPELL_NUMBING_ROAR = 55100, SPELL_NUMBING_ROAR = 55100,
SPELL_MOJO_FRENZY = 55163, 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_TRANSFORMATION = 55098, //Periodic, The caster transforms into a powerful mammoth, increasing Physical damage done by 25% and granting immunity to Stun effects.
}; };
@@ -133,23 +141,13 @@ struct boss_moorabiAI : public ScriptedAI
{ {
DoScriptText(SAY_DEATH, m_creature); 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) if (pInstance)
{
pInstance->SetData(DATA_MOORABI_EVENT, DONE); pInstance->SetData(DATA_MOORABI_EVENT, DONE);
if (IsHeroic() && !bPhase)
pInstance->DoCompleteAchievement(ACHIEVEMENT_LESS_RABI);
}
} }
void KilledUnit(Unit* pVictim) void KilledUnit(Unit* pVictim)
+23 -21
View File
@@ -1,14 +1,21 @@
/* Script Data Start /*
SDName: Boss slad_ran * Copyright (C) 2009-2010 TrinityCore <http://www.trinitycore.org/>
SDAuthor: LordVanMartin *
SD%Complete: * This program is free software; you can redistribute it and/or modify
SDComment: * it under the terms of the GNU General Public License as published by
SDCategory: * the Free Software Foundation; either version 2 of the License, or
Script Data End */ * (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 "ScriptedPch.h"
#include "gundrak.h" #include "gundrak.h"
@@ -50,13 +57,7 @@ enum ConstrictorSpells
H_SPELL_VENOMOUS_BITE = 58996 H_SPELL_VENOMOUS_BITE = 58996
}; };
// Spawning locations static Position SpawnLoc[]=
struct Locations
{
float x, y, z, orientation;
};
static Locations SpawnLoc[]=
{ {
{1783.81, 646.637, 133.948, 3.71755}, {1783.81, 646.637, 133.948, 3.71755},
{1775.03, 606.586, 134.165, 1.43117}, {1775.03, 606.586, 134.165, 1.43117},
@@ -135,20 +136,21 @@ struct boss_slad_ranAI : public ScriptedAI
{ {
if (uiPhase == 1) if (uiPhase == 1)
for (uint8 i = 0; i < DUNGEON_MODE(3, 5); ++i) 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) if (uiPhase == 2)
for (uint8 i = 0; i < DUNGEON_MODE(3, 5); ++i) 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; uiSpawnTimer = 5000;
} else uiSpawnTimer -= diff; } 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); DoScriptText(SAY_SUMMON_SNAKES,m_creature);
uiPhase = 1; uiPhase = 1;
} }
if ((uiPhase == 1) && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25)
if (uiPhase == 1 && HealthBelowPct(25))
{ {
DoScriptText(SAY_SUMMON_CONSTRICTORS,m_creature); DoScriptText(SAY_SUMMON_CONSTRICTORS,m_creature);
uiPhase = 2; uiPhase = 2;
+18
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 #ifndef DEF_GUNDRAK_H
#define DEF_GUNDRAK_H #define DEF_GUNDRAK_H
@@ -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 "ScriptedPch.h"
#include "gundrak.h" #include "gundrak.h"