Merge branch 'master' of [email protected]:TrinityCore/TrinityCore.git
This commit is contained in:
@@ -368,7 +368,7 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee
|
||||
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
|
||||
}
|
||||
|
||||
void MotionMaster::MoveFall()
|
||||
void MotionMaster::MoveFall(uint32 id/*=0*/)
|
||||
{
|
||||
// use larger distance for vmap height search than in most other cases
|
||||
float tz = i_owner->GetMap()->GetHeight(i_owner->GetPositionX(), i_owner->GetPositionY(), i_owner->GetPositionZ(), true, MAX_FALL_DISTANCE);
|
||||
@@ -387,7 +387,7 @@ void MotionMaster::MoveFall()
|
||||
init.MoveTo(i_owner->GetPositionX(),i_owner->GetPositionY(),tz);
|
||||
init.SetFall();
|
||||
init.Launch();
|
||||
Mutate(new EffectMovementGenerator(0), MOTION_SLOT_CONTROLLED);
|
||||
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
|
||||
}
|
||||
|
||||
void MotionMaster::MoveCharge(float x, float y, float z, float speed, uint32 id)
|
||||
|
||||
@@ -163,7 +163,7 @@ class MotionMaster //: private std::stack<MovementGenerator *>
|
||||
void MoveKnockbackFrom(float srcX, float srcY, float speedXY, float speedZ);
|
||||
void MoveJumpTo(float angle, float speedXY, float speedZ);
|
||||
void MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id = 0);
|
||||
void MoveFall();
|
||||
void MoveFall(uint32 id = 0);
|
||||
|
||||
void MoveSeekAssistance(float x, float y, float z);
|
||||
void MoveSeekAssistanceDistract(uint32 timer);
|
||||
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
return;
|
||||
return;
|
||||
|
||||
if (Intro)
|
||||
{
|
||||
|
||||
+58
-53
@@ -122,6 +122,11 @@ const Position SphereSpawn[6] =
|
||||
{ 706.6383f, 161.5266f, 155.6701f, 0 },
|
||||
};
|
||||
|
||||
enum MovementPoints
|
||||
{
|
||||
POINT_FALL_GROUND = 1
|
||||
};
|
||||
|
||||
class boss_anubarak_trial : public CreatureScript
|
||||
{
|
||||
public:
|
||||
@@ -553,68 +558,68 @@ public:
|
||||
|
||||
class mob_frost_sphere : public CreatureScript
|
||||
{
|
||||
public:
|
||||
mob_frost_sphere() : CreatureScript("mob_frost_sphere") { }
|
||||
public:
|
||||
mob_frost_sphere() : CreatureScript("mob_frost_sphere") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new mob_frost_sphereAI(creature);
|
||||
};
|
||||
|
||||
struct mob_frost_sphereAI : public ScriptedAI
|
||||
{
|
||||
mob_frost_sphereAI(Creature* creature) : ScriptedAI(creature)
|
||||
struct mob_frost_sphereAI : public ScriptedAI
|
||||
{
|
||||
}
|
||||
|
||||
bool m_bFall;
|
||||
float x, y, z;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_bFall = false;
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetFlying(true);
|
||||
me->SetDisplayId(25144);
|
||||
me->SetSpeed(MOVE_RUN, 0.5f, false);
|
||||
me->GetMotionMaster()->MoveRandom(20.0f);
|
||||
DoCast(SPELL_FROST_SPHERE);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*who*/, uint32& uiDamage)
|
||||
{
|
||||
if (me->GetHealth() < uiDamage)
|
||||
mob_frost_sphereAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
uiDamage = 0;
|
||||
if (!m_bFall)
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
_isFalling = false;
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetFlying(true);
|
||||
me->SetDisplayId(me->GetCreatureInfo()->Modelid2);
|
||||
me->SetSpeed(MOVE_RUN, 0.5f, false);
|
||||
me->GetMotionMaster()->MoveRandom(20.0f);
|
||||
DoCast(SPELL_FROST_SPHERE);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*who*/, uint32& damage)
|
||||
{
|
||||
if (me->GetHealth() <= damage)
|
||||
{
|
||||
m_bFall = true;
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
//At hit the ground
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH);
|
||||
me->GetMotionMaster()->MoveFall();
|
||||
damage = 0;
|
||||
if (!_isFalling)
|
||||
{
|
||||
_isFalling = true;
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
//At hit the ground
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH);
|
||||
me->GetMotionMaster()->MoveFall(POINT_FALL_GROUND);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 uiType, uint32 uiId)
|
||||
{
|
||||
if (uiType != POINT_MOTION_TYPE) return;
|
||||
|
||||
switch (uiId)
|
||||
void MovementInform(uint32 type, uint32 pointId)
|
||||
{
|
||||
case 0:
|
||||
me->RemoveAurasDueToSpell(SPELL_FROST_SPHERE);
|
||||
me->SetDisplayId(11686);
|
||||
DoCast(SPELL_PERMAFROST_VISUAL);
|
||||
DoCast(SPELL_PERMAFROST);
|
||||
me->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.0f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
if (type != EFFECT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
switch (pointId)
|
||||
{
|
||||
case POINT_FALL_GROUND:
|
||||
me->RemoveAurasDueToSpell(SPELL_FROST_SPHERE);
|
||||
me->SetDisplayId(me->GetCreatureInfo()->Modelid1);
|
||||
DoCast(SPELL_PERMAFROST_VISUAL);
|
||||
DoCast(SPELL_PERMAFROST);
|
||||
me->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.0f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
bool _isFalling;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new mob_frost_sphereAI(creature);
|
||||
};
|
||||
};
|
||||
|
||||
class mob_anubarak_spike : public CreatureScript
|
||||
|
||||
@@ -268,7 +268,7 @@ class boss_sindragosa : public CreatureScript
|
||||
|
||||
void MovementInform(uint32 type, uint32 point)
|
||||
{
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
switch (point)
|
||||
|
||||
@@ -94,6 +94,11 @@ enum SvalaPhase
|
||||
SVALADEAD
|
||||
};
|
||||
|
||||
enum SvalaPoint
|
||||
{
|
||||
POINT_FALL_GROUND = 1,
|
||||
};
|
||||
|
||||
#define DATA_INCREDIBLE_HULK 2043
|
||||
|
||||
static const float spectatorWP[2][3] =
|
||||
@@ -258,16 +263,16 @@ public:
|
||||
|
||||
SetCombatMovement(false);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH);
|
||||
me->GetMotionMaster()->MoveFall();
|
||||
me->GetMotionMaster()->MoveFall(POINT_FALL_GROUND);
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 motionType, uint32 pointId)
|
||||
{
|
||||
if (motionType != POINT_MOTION_TYPE)
|
||||
if (motionType != EFFECT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
if (pointId == 1)
|
||||
if (pointId == POINT_FALL_GROUND)
|
||||
me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
}
|
||||
|
||||
@@ -288,7 +293,7 @@ public:
|
||||
Phase = NORMAL;
|
||||
SetCombatMovement(true);
|
||||
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 300, true))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 300.0f, true))
|
||||
me->GetMotionMaster()->MoveChase(target);
|
||||
}
|
||||
}
|
||||
@@ -330,7 +335,7 @@ public:
|
||||
{
|
||||
std::list<Creature*> lspectatorList;
|
||||
GetCreatureListWithEntryInGrid(lspectatorList, me, CREATURE_SPECTATOR, 100.0f);
|
||||
for(std::list<Creature*>::iterator itr = lspectatorList.begin(); itr != lspectatorList.end(); ++itr)
|
||||
for (std::list<Creature*>::iterator itr = lspectatorList.begin(); itr != lspectatorList.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->isAlive())
|
||||
{
|
||||
@@ -397,7 +402,8 @@ public:
|
||||
Phase = NORMAL;
|
||||
break;
|
||||
}
|
||||
} else introTimer -= diff;
|
||||
}
|
||||
else introTimer -= diff;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user