Merge commit 'd3ad87b1cf48222aef5cbbc1f00cf2babadce111' into 4.3.4
Conflicts: sql/updates/world/2015_03_16_00_world.sql sql/updates/world/2015_03_16_01_world_335.sql
This commit is contained in:
commit
f7f6eae247
13 files changed
+99
-123
No files matched your search
@@ -36,19 +36,27 @@ EndContentData */
|
||||
# at_malfurion_Stormrage_trigger
|
||||
#####*/
|
||||
|
||||
enum MalfurionMisc
|
||||
{
|
||||
NPC_MALFURION_STORMRAGE = 15362,
|
||||
QUEST_ERANIKUS_TYRANT_OF_DREAMS = 8733,
|
||||
QUEST_THE_CHARGE_OF_DRAGONFLIGHTS = 8555,
|
||||
};
|
||||
|
||||
class at_malfurion_stormrage : public AreaTriggerScript
|
||||
{
|
||||
public:
|
||||
at_malfurion_stormrage() : AreaTriggerScript("at_malfurion_stormrage") { }
|
||||
|
||||
bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) override
|
||||
{
|
||||
if (player->GetInstanceScript() && !player->FindNearestCreature(15362, 15))
|
||||
player->SummonCreature(15362, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), -1.52f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 100000);
|
||||
return false;
|
||||
}
|
||||
public:
|
||||
at_malfurion_stormrage() : AreaTriggerScript("at_malfurion_stormrage") { }
|
||||
|
||||
bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) override
|
||||
{
|
||||
if (player->GetInstanceScript() && !player->FindNearestCreature(NPC_MALFURION_STORMRAGE, 15.0f) &&
|
||||
player->GetQuestStatus(QUEST_THE_CHARGE_OF_DRAGONFLIGHTS) == QUEST_STATUS_REWARDED && player->GetQuestStatus(QUEST_ERANIKUS_TYRANT_OF_DREAMS) != QUEST_STATUS_REWARDED)
|
||||
player->SummonCreature(NPC_MALFURION_STORMRAGE, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), -1.52f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 100000);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/*#####
|
||||
# go_atalai_statue
|
||||
#####*/
|
||||
|
||||
@@ -2640,13 +2640,7 @@ class npc_quel_delar_sword : public CreatureScript
|
||||
break;
|
||||
case EVENT_QUEL_DELAR_FLIGHT:
|
||||
{
|
||||
Movement::MoveSplineInit init(me);
|
||||
FillCirclePath(QuelDelarCenterPos, 18.0f, 718.046f, init.Path(), true);
|
||||
init.SetFly();
|
||||
init.SetCyclic();
|
||||
init.SetAnimation(Movement::ToFly);
|
||||
init.Launch();
|
||||
|
||||
me->GetMotionMaster()->MoveCirclePath(QuelDelarCenterPos.GetPositionX(), QuelDelarCenterPos.GetPositionY(), 718.046f, 18.0f, true, 16);
|
||||
_events.ScheduleEvent(EVENT_QUEL_DELAR_LAND, 15000);
|
||||
break;
|
||||
}
|
||||
@@ -2694,21 +2688,6 @@ class npc_quel_delar_sword : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
void FillCirclePath(Position const& centerPos, float radius, float z, Movement::PointsArray& path, bool clockwise)
|
||||
{
|
||||
float step = clockwise ? -M_PI / 8.0f : M_PI / 8.0f;
|
||||
float angle = centerPos.GetAngle(me->GetPositionX(), me->GetPositionY());
|
||||
|
||||
for (uint8 i = 0; i < 16; angle += step, ++i)
|
||||
{
|
||||
G3D::Vector3 point;
|
||||
point.x = centerPos.GetPositionX() + radius * cosf(angle);
|
||||
point.y = centerPos.GetPositionY() + radius * sinf(angle);
|
||||
point.z = z;
|
||||
path.push_back(point);
|
||||
}
|
||||
}
|
||||
|
||||
EventMap _events;
|
||||
InstanceScript* _instance;
|
||||
bool _intro;
|
||||
|
||||
@@ -520,11 +520,7 @@ public:
|
||||
_despawned = false;
|
||||
break;
|
||||
case ACTION_CYCLIC_MOVEMENT:
|
||||
Movement::MoveSplineInit init(me);
|
||||
FillCirclePath(MalygosPositions[3], 120.0f, 283.2763f, init.Path(), true);
|
||||
init.SetFly();
|
||||
init.SetCyclic();
|
||||
init.Launch();
|
||||
me->GetMotionMaster()->MoveCirclePath(MalygosPositions[3].GetPositionX(), MalygosPositions[3].GetPositionY(), 283.2763f, 120.0f, true, 16);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1020,22 +1016,6 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
// Used to generate perfect cyclic movements (Enter Circle).
|
||||
void FillCirclePath(Position const& centerPos, float radius, float z, Movement::PointsArray& path, bool clockwise)
|
||||
{
|
||||
float step = clockwise ? float(-M_PI) / 8.0f : float(M_PI) / 8.0f;
|
||||
float angle = centerPos.GetAngle(me->GetPositionX(), me->GetPositionY());
|
||||
|
||||
for (uint8 i = 0; i < 16; angle += step, ++i)
|
||||
{
|
||||
G3D::Vector3 point;
|
||||
point.x = centerPos.GetPositionX() + radius * cosf(angle);
|
||||
point.y = centerPos.GetPositionY() + radius * sinf(angle);
|
||||
point.z = z; // Don't use any height getters unless all bugs are fixed.
|
||||
path.push_back(point);
|
||||
}
|
||||
}
|
||||
|
||||
uint8 _phase; // Counter for phases used with a getter.
|
||||
uint8 _summonDeaths; // Keeps count of arcane trash.
|
||||
uint8 _preparingPulsesChecker; // In retail they use 2 preparing pulses with 7 sec CD, after they pass 2 seconds.
|
||||
@@ -1326,11 +1306,7 @@ public:
|
||||
{
|
||||
if (action < ACTION_DELAYED_DESPAWN)
|
||||
{
|
||||
Movement::MoveSplineInit init(me);
|
||||
FillCirclePath(MalygosPositions[3], 35.0f, 282.3402f, init.Path(), true);
|
||||
init.SetFly();
|
||||
init.SetCyclic();
|
||||
init.Launch();
|
||||
me->GetMotionMaster()->MoveCirclePath(MalygosPositions[3].GetPositionX(), MalygosPositions[3].GetPositionY(), 282.3402f, 35.0f, true, 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1339,21 +1315,6 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void FillCirclePath(Position const& centerPos, float radius, float z, Movement::PointsArray& path, bool clockwise)
|
||||
{
|
||||
float step = clockwise ? float(-M_PI) / 9.0f : float(M_PI) / 9.0f;
|
||||
float angle = centerPos.GetAngle(me->GetPositionX(), me->GetPositionY());
|
||||
|
||||
for (uint8 i = 0; i < 18; angle += step, ++i)
|
||||
{
|
||||
G3D::Vector3 point;
|
||||
point.x = centerPos.GetPositionX() + radius * cosf(angle);
|
||||
point.y = centerPos.GetPositionY() + radius * sinf(angle);
|
||||
point.z = z; // Don't use any height getters unless all bugs are fixed.
|
||||
path.push_back(point);
|
||||
}
|
||||
}
|
||||
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
|
||||
@@ -1126,30 +1126,11 @@ class npc_ominous_cloud : public CreatureScript
|
||||
DoCast(me, SPELL_OMINOUS_CLOUD_VISUAL);
|
||||
}
|
||||
|
||||
void FillCirclePath(Position const& centerPos, float radius, float z, Movement::PointsArray& path, bool clockwise)
|
||||
{
|
||||
float step = clockwise ? float(-M_PI) / 8.0f : float(M_PI) / 8.0f;
|
||||
float angle = centerPos.GetAngle(me->GetPositionX(), me->GetPositionY());
|
||||
|
||||
for (uint8 i = 0; i < 16; angle += step, ++i)
|
||||
{
|
||||
G3D::Vector3 point;
|
||||
point.x = centerPos.GetPositionX() + radius * cosf(angle);
|
||||
point.y = centerPos.GetPositionY() + radius * sinf(angle);
|
||||
point.z = me->GetMap()->GetHeight(me->GetPhaseMask(), point.x, point.y, z + 5.0f);
|
||||
path.push_back(point);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) override { }
|
||||
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
Movement::MoveSplineInit init(me);
|
||||
FillCirclePath(YoggSaronSpawnPos, me->GetDistance2d(YoggSaronSpawnPos.GetPositionX(), YoggSaronSpawnPos.GetPositionY()), me->GetPositionZ(), init.Path(), action != 0);
|
||||
init.SetWalk(true);
|
||||
init.SetCyclic();
|
||||
init.Launch();
|
||||
me->GetMotionMaster()->MoveCirclePath(YoggSaronSpawnPos.GetPositionX(), YoggSaronSpawnPos.GetPositionY(), me->GetPositionZ() + 5.0f, me->GetDistance2d(YoggSaronSpawnPos.GetPositionX(), YoggSaronSpawnPos.GetPositionY()), true, 16);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user