Scripts/TotFW: updated Conclave of Wind script to new format and fixed remaining flaws with the platform selector

This commit is contained in:
Ovahlord
2018-10-09 14:44:13 +02:00
parent 21e673bd6b
commit 05ad50f59b
5 changed files with 501 additions and 497 deletions

View File

@@ -25,7 +25,10 @@
20:25:39.343 -- jet stream cast
20:25:41.376 -- wind pre effect warning
20:25:43.394
20:25:43.493 -- you think you outrun the wind???
20:26:44.509 -- teleport to center west
@@ -48,6 +51,8 @@ UPDATE `creature_template` SET `minlevel`= 88, `maxlevel`= 88, `exp`= 3, `factio
UPDATE `creature_template` SET `unit_flags`= 33555200, `flags_extra`= 128, `ScriptName`= 'npc_conclave_of_wind_ravenous_creeper_trigger' WHERE `entry`= 45813;
-- Soothing Breeze
UPDATE `creature_template` SET `unit_flags`= 33554432, `flags_extra`= 128 WHERE `entry`= 46246;
-- North Wind
UPDATE `creature_template` SET `unit_flags`= 33554432, `flags_extra`= 128 WHERE `entry`= 47926;
-- Creature Text
DELETE FROM `creature_text` WHERE `CreatureID` IN (21252, 45870, 45871, 45872);
@@ -93,8 +98,21 @@ INSERT INTO `creature_template_addon` (`entry`, `auras`) VALUES
-- Spells
DELETE FROM `spell_script_names` WHERE `ScriptName` IN
('spell_conclave_of_wind_winds_pre_effect_warning',
'spell_conclave_of_wind_winds_distance_checker');
'spell_conclave_of_wind_winds_distance_checker',
'spell_conclave_of_winds_teleport_to_center');
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(96508, 'spell_conclave_of_wind_winds_pre_effect_warning'),
(85763, 'spell_conclave_of_wind_winds_distance_checker');
(85763, 'spell_conclave_of_wind_winds_distance_checker'),
(89843, 'spell_conclave_of_winds_teleport_to_center'),
(89844, 'spell_conclave_of_winds_teleport_to_center');
DELETE FROM `conditions` WHERE `SourceEntry` IN (89844, 89843) AND `SourceTypeOrReferenceId`= 13;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ScriptName`, `Comment`) VALUES
(13, 1, 89844, 0, 0, 31, 0, 3, 47925, 0, 0, 0, '', 'Teleport to Center (West) - Target West Wind'),
(13, 1, 89843, 0, 0, 31, 0, 3, 47926, 0, 0, 0, '', 'Teleport to Center (North) - Target North Wind');

View File

@@ -4784,6 +4784,27 @@ void SpellMgr::LoadSpellInfoCorrections()
// ENDOF ZUL'GURUB SPELLS
//
// THRONE OF THE FOUR WINDS SPELLS
//
// Teleport to Center
ApplySpellFix({
89844, // West
89843 // North
}, [](SpellInfo* spellInfo)
{
spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(135); // 100yd
});
// Nurture
ApplySpellFix({ 85425 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx &= ~SPELL_ATTR1_CHANNELED_2;
});
// ENDOF THRONE OF THE FOUR WINDS SPELLS
// Disenchant
ApplySpellFix({ 13262 }, [](SpellInfo* spellInfo)
{

View File

@@ -42,16 +42,6 @@ ObjectData const gameObjectData[] =
{ 0, 0 } // End
};
AreaBoundary const* anshalCircle = new CircleBoundary(Position(-47.953f, 1053.439f), MAX_HOME_POSITION_DISTANCE);
AreaBoundary const* nezirCircle = new CircleBoundary(Position(189.393f, 812.568f), MAX_HOME_POSITION_DISTANCE);
AreaBoundary const* rohashCircle = new CircleBoundary(Position(-51.463f, 576.250f), MAX_HOME_POSITION_DISTANCE);
AreaBoundary const* anshalNezirBoundary = new BoundaryUnionBoundary(anshalCircle, nezirCircle);
BossBoundaryData const boundaries =
{
{ DATA_CONCLAVE_OF_WIND, new BoundaryUnionBoundary(anshalNezirBoundary, rohashCircle) }
};
class instance_throne_of_the_four_winds : public InstanceMapScript
{
public:
@@ -64,7 +54,6 @@ class instance_throne_of_the_four_winds : public InstanceMapScript
SetHeaders(DataHeader);
SetBossNumber(EncounterCount);
LoadObjectData(creatureData, gameObjectData);
LoadBossBoundaries(boundaries);
Initialize();
}
@@ -85,6 +74,10 @@ class instance_throne_of_the_four_winds : public InstanceMapScript
case BOSS_NEZIR:
case BOSS_ROHASH:
break;
case NPC_RAVENOUS_CREEPER:
if (Creature* anshal = GetCreature(DATA_ANSHAL))
anshal->AI()->JustSummoned(creature);
break;
default:
break;
}
@@ -109,13 +102,13 @@ class instance_throne_of_the_four_winds : public InstanceMapScript
if (state == IN_PROGRESS)
{
if (Creature* anshal = GetCreature(DATA_ANSHAL))
anshal->SetInCombatWithZone();
anshal->AI()->DoZoneInCombat();
if (Creature* nezir = GetCreature(DATA_NEZIR))
nezir->SetInCombatWithZone();
nezir->AI()->DoZoneInCombat();
if (Creature* rohash = GetCreature(DATA_ROHASH))
rohash->SetInCombatWithZone();
rohash->AI()->DoZoneInCombat();
}
break;
default:

View File

@@ -65,12 +65,12 @@ enum TFWMisc
{
};
#define MAX_HOME_POSITION_DISTANCE 65.0f
template <class AI, class T>
inline AI* GetThroneOfTheFourWindsAI(T* obj)
{
return GetInstanceAI<AI>(obj, TotFWScriptName);
}
#define RegisterThroneOfTheFourWindsCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetThroneOfTheFourWindsAI)
#endif // THRONE_OF_THE_FOUR_WINDS_H_