mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Scripts/HallsOfLightning: Remove hack for Volkhan "Shatter Resistant"
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
DELETE FROM `disables` WHERE `sourceType`=4 AND `entry`=7321;
|
||||
|
||||
DELETE FROM `achievement_criteria_data` WHERE `criteria_id`=7321;
|
||||
INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES
|
||||
(7321,11,0,0,'achievement_shatter_resistant'),
|
||||
(7321,12,1,0,'');
|
||||
@@ -23,14 +23,13 @@ SDComment: Event should be pretty close minus a few visual flaws
|
||||
SDCategory: Halls of Lightning
|
||||
EndScriptData */
|
||||
|
||||
#include "AchievementMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "halls_of_lightning.h"
|
||||
#include "Player.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
enum eEnums
|
||||
enum Enums
|
||||
{
|
||||
SAY_AGGRO = 0,
|
||||
SAY_FORGE = 1,
|
||||
@@ -63,7 +62,7 @@ enum eEnums
|
||||
|
||||
MAX_GOLEM = 2,
|
||||
|
||||
ACHIEVEMENT_SHATTER_RESISTANT = 2042
|
||||
DATA_SHATTER_RESISTANT = 2042
|
||||
};
|
||||
|
||||
/*######
|
||||
@@ -153,21 +152,6 @@ public:
|
||||
|
||||
if (instance)
|
||||
instance->SetData(TYPE_VOLKHAN, DONE);
|
||||
|
||||
if (IsHeroic() && GolemsShattered < 5)
|
||||
{
|
||||
AchievementEntry const* AchievShatterResistant = sAchievementMgr->GetAchievement(ACHIEVEMENT_SHATTER_RESISTANT);
|
||||
if (AchievShatterResistant)
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
if (map && map->IsDungeon())
|
||||
{
|
||||
Map::PlayerList const &players = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
itr->getSource()->CompletedAchievement(AchievShatterResistant);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
@@ -234,6 +218,14 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 data) const
|
||||
{
|
||||
if (data == DATA_SHATTER_RESISTANT)
|
||||
return GolemsShattered;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
@@ -462,8 +454,20 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
class achievement_shatter_resistant : public AchievementCriteriaScript
|
||||
{
|
||||
public:
|
||||
achievement_shatter_resistant() : AchievementCriteriaScript("achievement_shatter_resistant") { }
|
||||
|
||||
bool OnCheck(Player* /*source*/, Unit* target)
|
||||
{
|
||||
return target && target->GetAI()->GetData(DATA_SHATTER_RESISTANT) < 5;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_volkhan()
|
||||
{
|
||||
new boss_volkhan();
|
||||
new mob_molten_golem();
|
||||
new achievement_shatter_resistant();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user