mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
Merge pull request #4 from lellonicole/master
[Core/Script] Gundrak, fix spawn Eck only in heroic mode
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
DELETE FROM `item_template` WHERE `entry` = 34833;
|
||||
INSERT INTO `item_template` (`entry`, `class`, `subclass`, `SoundOverrideSubclass`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `BuyCount`, `BuyPrice`, `SellPrice`, `InventoryType`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `RequiredSkill`, `RequiredSkillRank`, `requiredspell`, `requiredhonorrank`, `RequiredCityRank`, `RequiredReputationFaction`, `RequiredReputationRank`, `maxcount`, `stackable`, `ContainerSlots`, `StatsCount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScalingStatDistribution`, `ScalingStatValue`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `RangedModRange`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellppmRate_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellppmRate_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellppmRate_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellppmRate_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `PageText`, `LanguageID`, `PageMaterial`, `startquest`, `lockid`, `Material`, `sheath`, `RandomProperty`, `RandomSuffix`, `block`, `itemset`, `MaxDurability`, `area`, `Map`, `BagFamily`, `TotemCategory`, `socketColor_1`, `socketContent_1`, `socketColor_2`, `socketContent_2`, `socketColor_3`, `socketContent_3`, `socketBonus`, `GemProperties`, `RequiredDisenchantSkill`, `ArmorDamageModifier`, `duration`, `ItemLimitCategory`, `HolidayId`, `ScriptName`, `DisenchantID`, `FoodType`, `minMoneyLoot`, `maxMoneyLoot`, `flagsCustom`, `VerifiedBuild`) VALUES (34833, 12, 0, 0, 'Unlit Torches', 7290, 1, 2, 0, 1, 0, 0, 0, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45671, 0, 0, 0, 5000, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 4, '', 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 12340);
|
||||
@@ -180,6 +180,7 @@ class instance_gundrak : public InstanceMapScript
|
||||
case DATA_ECK_THE_FEROCIOUS_INIT:
|
||||
{
|
||||
Position pos = {1624.70f, 891.43f, 95.08f, 1.2f};
|
||||
if (instance->IsHeroic())
|
||||
instance->SummonCreature(NPC_ECK_THE_FEROCIOUS, pos);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
me->ApplySpellImmune(0, IMMUNITY_ID, 49838, true);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
if( lock )
|
||||
return;
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
me->ResetPlayerDamageReq();
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
@@ -206,24 +206,46 @@ public:
|
||||
pInstance->SetData(DATA_UROM, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
{
|
||||
Talk(SAY_PLAYER_KILL);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spell)
|
||||
void SpellHit(Unit* /*caster*/, const SpellInfo* spell)
|
||||
{
|
||||
switch( spell->Id )
|
||||
{
|
||||
case SPELL_SUMMON_MENAGERIE_1:
|
||||
{
|
||||
for( uint8 i=0; i<4; ++i )
|
||||
me->SummonCreature(summons[0][i], cords[0][0] + ((i%2) ? 4.0f : -4.0f), cords[0][1] + (i<2 ? 4.0f : -4.0f), cords[0][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
|
||||
uint8 phase = GetPhaseByCurrentPosition();
|
||||
me->SetHomePosition(cords[phase+1][0], cords[phase+1][1], cords[phase+1][2], cords[phase+1][3]);
|
||||
me->DestroyForNearbyPlayers();
|
||||
LeaveCombat();
|
||||
me->CastSpell(me, SPELL_EVOCATION, true);
|
||||
releaseLockTimer = 1;
|
||||
}
|
||||
break;
|
||||
case SPELL_SUMMON_MENAGERIE_2:
|
||||
{
|
||||
for( uint8 i=0; i<4; ++i )
|
||||
me->SummonCreature(summons[1][i], cords[1][0] + ((i%2) ? 4.0f : -4.0f), cords[1][1] + (i<2 ? 4.0f : -4.0f), cords[1][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
|
||||
uint8 phase = GetPhaseByCurrentPosition();
|
||||
me->SetHomePosition(cords[phase+1][0], cords[phase+1][1], cords[phase+1][2], cords[phase+1][3]);
|
||||
me->DestroyForNearbyPlayers();
|
||||
LeaveCombat();
|
||||
me->CastSpell(me, SPELL_EVOCATION, true);
|
||||
releaseLockTimer = 1;
|
||||
}
|
||||
break;
|
||||
case SPELL_SUMMON_MENAGERIE_3:
|
||||
{
|
||||
me->DestroyForNearbyPlayers();
|
||||
uint8 phase = GetPhaseByCurrentPosition();
|
||||
for( uint8 i=0; i<4; ++i )
|
||||
me->SummonCreature(summons[phase][i], cords[phase][0] + ((i%2) ? 4.0f : -4.0f), cords[phase][1] + (i<2 ? 4.0f : -4.0f), cords[phase][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
|
||||
+ me->SummonCreature(summons[2][i], cords[2][0] + ((i%2) ? 4.0f : -4.0f), cords[2][1] + (i<2 ? 4.0f : -4.0f), cords[2][2], 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
|
||||
uint8 phase = GetPhaseByCurrentPosition();
|
||||
me->SetHomePosition(cords[phase+1][0], cords[phase+1][1], cords[phase+1][2], cords[phase+1][3]);
|
||||
me->DestroyForNearbyPlayers();
|
||||
LeaveCombat();
|
||||
me->CastSpell(me, SPELL_EVOCATION, true);
|
||||
releaseLockTimer = 1;
|
||||
@@ -249,7 +271,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) {}
|
||||
void MoveInLineOfSight(Unit* /*who*/) {}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user