remove CRLF from blackrock spire scripts.
--HG-- branch : trunk
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
UPDATE `instance_template` SET `script`='instance_blackrock_spire' WHERE `map`=229;
|
UPDATE `instance_template` SET `script`='instance_blackrock_spire' WHERE `map`=229;
|
||||||
UPDATE `creature_template` SET `ScriptName`='npc_rookey_whelp' WHERE `entry`=10161;
|
UPDATE `creature_template` SET `ScriptName`='npc_rookey_whelp' WHERE `entry`=10161;
|
||||||
UPDATE `gameobject_template` SET `ScriptName`='go_rookey_egg' WHERE `entry`=175124;
|
UPDATE `gameobject_template` SET `ScriptName`='go_rookey_egg' WHERE `entry`=175124;
|
||||||
|
|||||||
@@ -1,79 +1,79 @@
|
|||||||
/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org>
|
/* Copyright (C) 2008 - 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
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ScriptedPch.h"
|
#include "ScriptedPch.h"
|
||||||
#include "blackrock_spire.h"
|
#include "blackrock_spire.h"
|
||||||
|
|
||||||
enum Creatures
|
enum Creatures
|
||||||
{
|
{
|
||||||
NPC_ROOKERY_WHELP = 10161
|
NPC_ROOKERY_WHELP = 10161
|
||||||
};
|
};
|
||||||
|
|
||||||
struct npc_rookey_whelpAI : public ScriptedAI
|
struct npc_rookey_whelpAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
npc_rookey_whelpAI(Creature *c) : ScriptedAI(c)
|
npc_rookey_whelpAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|
||||||
void JustDied(Unit *who)
|
void JustDied(Unit *who)
|
||||||
{
|
{
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
{
|
{
|
||||||
pInstance->SetData(WHELP_DEATH_COUNT, pInstance->GetData(WHELP_DEATH_COUNT)+1);
|
pInstance->SetData(WHELP_DEATH_COUNT, pInstance->GetData(WHELP_DEATH_COUNT)+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI_rookey_whelp(Creature* pCreature)
|
CreatureAI* GetAI_rookey_whelp(Creature* pCreature)
|
||||||
{
|
{
|
||||||
return new npc_rookey_whelpAI(pCreature);
|
return new npc_rookey_whelpAI(pCreature);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GOHello_rookey_egg(Player *pPlayer, GameObject *pGO)
|
bool GOHello_rookey_egg(Player *pPlayer, GameObject *pGO)
|
||||||
{
|
{
|
||||||
Position pos;
|
Position pos;
|
||||||
pPlayer->GetPosition(&pos);
|
pPlayer->GetPosition(&pos);
|
||||||
pPlayer->SummonCreature(NPC_ROOKERY_WHELP, pos, TEMPSUMMON_TIMED_DESPAWN, 15*IN_MILISECONDS);
|
pPlayer->SummonCreature(NPC_ROOKERY_WHELP, pos, TEMPSUMMON_TIMED_DESPAWN, 15*IN_MILISECONDS);
|
||||||
//destroy gobject need to be implemented
|
//destroy gobject need to be implemented
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_blackrock_spire()
|
void AddSC_blackrock_spire()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
|
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name = "npc_rookey_whelp";
|
newscript->Name = "npc_rookey_whelp";
|
||||||
newscript->GetAI = &GetAI_rookey_whelp;
|
newscript->GetAI = &GetAI_rookey_whelp;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
|
|
||||||
newscript->Name = "go_rookey_egg";
|
newscript->Name = "go_rookey_egg";
|
||||||
newscript->pGOHello = &GOHello_rookey_egg;
|
newscript->pGOHello = &GOHello_rookey_egg;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org>
|
/* Copyright (C) 2008 - 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
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef DEF_BRS_H
|
#ifndef DEF_BRS_H
|
||||||
#define DEF_BRS_H
|
#define DEF_BRS_H
|
||||||
|
|
||||||
enum Data
|
enum Data
|
||||||
{
|
{
|
||||||
EVENT_LEEEROY,
|
EVENT_LEEEROY,
|
||||||
WHELP_DEATH_COUNT
|
WHELP_DEATH_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,104 +1,104 @@
|
|||||||
/* Copyright (C) 2008 - 2010 TrinityCore <http://www.trinitycore.org>
|
/* Copyright (C) 2008 - 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
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ScriptedPch.h"
|
#include "ScriptedPch.h"
|
||||||
#include "blackrock_spire.h"
|
#include "blackrock_spire.h"
|
||||||
|
|
||||||
enum Achievements
|
enum Achievements
|
||||||
{
|
{
|
||||||
ACHIEV_LEROY_JENKINS = 2188
|
ACHIEV_LEROY_JENKINS = 2188
|
||||||
};
|
};
|
||||||
|
|
||||||
struct instance_blackrock_spire : public ScriptedInstance
|
struct instance_blackrock_spire : public ScriptedInstance
|
||||||
{
|
{
|
||||||
instance_blackrock_spire(Map* pMap) : ScriptedInstance(pMap) {}
|
instance_blackrock_spire(Map* pMap) : ScriptedInstance(pMap) {}
|
||||||
|
|
||||||
uint32 uiLeeroyTimer;
|
uint32 uiLeeroyTimer;
|
||||||
uint32 uiWhelpCount;
|
uint32 uiWhelpCount;
|
||||||
uint32 uiLeroyData;
|
uint32 uiLeroyData;
|
||||||
|
|
||||||
bool bLeeeeeeeeroy;
|
bool bLeeeeeeeeroy;
|
||||||
|
|
||||||
void Initialize()
|
void Initialize()
|
||||||
{
|
{
|
||||||
uiLeeroyTimer = 15*IN_MILISECONDS;
|
uiLeeroyTimer = 15*IN_MILISECONDS;
|
||||||
uiWhelpCount = 0;
|
uiWhelpCount = 0;
|
||||||
bLeeeeeeeeroy = true;
|
bLeeeeeeeeroy = true;
|
||||||
uiLeroyData = 0;
|
uiLeroyData = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetData(uint32 type, uint32 data)
|
void SetData(uint32 type, uint32 data)
|
||||||
{
|
{
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case EVENT_LEEEROY:
|
case EVENT_LEEEROY:
|
||||||
if (data == DONE)
|
if (data == DONE)
|
||||||
DoCompleteAchievement(ACHIEV_LEROY_JENKINS);
|
DoCompleteAchievement(ACHIEV_LEROY_JENKINS);
|
||||||
uiLeroyData = data;
|
uiLeroyData = data;
|
||||||
break;
|
break;
|
||||||
case WHELP_DEATH_COUNT:
|
case WHELP_DEATH_COUNT:
|
||||||
if (data == 1)
|
if (data == 1)
|
||||||
{
|
{
|
||||||
SetData(EVENT_LEEEROY, IN_PROGRESS);
|
SetData(EVENT_LEEEROY, IN_PROGRESS);
|
||||||
//DoSendNotifyToInstance("Leeeeeeeeeeeeeroy! Started");
|
//DoSendNotifyToInstance("Leeeeeeeeeeeeeroy! Started");
|
||||||
}
|
}
|
||||||
uiWhelpCount = data;
|
uiWhelpCount = data;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 GetData(uint32 type)
|
uint32 GetData(uint32 type)
|
||||||
{
|
{
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case EVENT_LEEEROY: return uiLeroyData;
|
case EVENT_LEEEROY: return uiLeroyData;
|
||||||
case WHELP_DEATH_COUNT: return uiWhelpCount;
|
case WHELP_DEATH_COUNT: return uiWhelpCount;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update(uint32 diff)
|
void Update(uint32 diff)
|
||||||
{
|
{
|
||||||
if (GetData(EVENT_LEEEROY) != FAIL && GetData(EVENT_LEEEROY) == IN_PROGRESS)
|
if (GetData(EVENT_LEEEROY) != FAIL && GetData(EVENT_LEEEROY) == IN_PROGRESS)
|
||||||
{
|
{
|
||||||
if (uiLeeroyTimer <= diff)
|
if (uiLeeroyTimer <= diff)
|
||||||
{
|
{
|
||||||
SetData(EVENT_LEEEROY, FAIL);
|
SetData(EVENT_LEEEROY, FAIL);
|
||||||
bLeeeeeeeeroy = false;
|
bLeeeeeeeeroy = false;
|
||||||
//DoSendNotifyToInstance("Leeeeeeeeeeeeeroy! Failed");
|
//DoSendNotifyToInstance("Leeeeeeeeeeeeeroy! Failed");
|
||||||
} else uiLeeroyTimer -= diff;
|
} else uiLeeroyTimer -= diff;
|
||||||
if (uiWhelpCount >= 50 && bLeeeeeeeeroy)
|
if (uiWhelpCount >= 50 && bLeeeeeeeeroy)
|
||||||
{
|
{
|
||||||
SetData(EVENT_LEEEROY, DONE);
|
SetData(EVENT_LEEEROY, DONE);
|
||||||
//DoSendNotifyToInstance("Leeeeeeeeeeeeeroy! Success");
|
//DoSendNotifyToInstance("Leeeeeeeeeeeeeroy! Success");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
InstanceData* GetInstanceData_instance_blackrock_spire(Map* pMap)
|
InstanceData* GetInstanceData_instance_blackrock_spire(Map* pMap)
|
||||||
{
|
{
|
||||||
return new instance_blackrock_spire(pMap);
|
return new instance_blackrock_spire(pMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddSC_instance_blackrock_spire()
|
void AddSC_instance_blackrock_spire()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name = "instance_blackrock_spire";
|
newscript->Name = "instance_blackrock_spire";
|
||||||
newscript->GetInstanceData = &GetInstanceData_instance_blackrock_spire;
|
newscript->GetInstanceData = &GetInstanceData_instance_blackrock_spire;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user