Rename "SetPosition" to "UpdatePosition".

Replace CreatureRelocation in scripts with new Creature::SetPosition.
This commit is contained in:
megamage
2011-10-10 17:08:01 -04:00
parent 76c9c30c2b
commit d156e066cf
33 changed files with 74 additions and 59 deletions
@@ -206,7 +206,7 @@ public:
{
float x = KaelLocations[0][0];
float y = KaelLocations[0][1];
me->GetMap()->CreatureRelocation(me, x, y, LOCATION_Z, 0.0f);
me->SetPosition(x, y, LOCATION_Z, 0.0f);
//me->SendMonsterMove(x, y, LOCATION_Z, 0, 0, 0); // causes some issues...
std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
for (i = me->getThreatManager().getThreatList().begin(); i!= me->getThreatManager().getThreatList().end(); ++i)
@@ -53,7 +53,7 @@ public:
me->GetPosition(x, y, z);
z += 4; x -= 3.5; y -= 5;
me->GetMotionMaster()->Clear(false);
me->GetMap()->CreatureRelocation(me, x, y, z, 0.0f);
me->SetPosition(x, y, z, 0.0f);
}
void UpdateAI(const uint32 diff)
@@ -756,7 +756,7 @@ public:
{
float x, y, z;
me->GetPosition(x, y, z); //this visual aura some under ground
me->GetMap()->CreatureRelocation(me, x, y, z + 0.35f, 0.0f);
me->SetPosition(x, y, z + 0.35f, 0.0f);
Despawn();
Creature* debuff = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 14500);
if (debuff)
@@ -661,7 +661,7 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_SATH_DEATH, me);
me->GetMap()->CreatureRelocation(me, me->GetPositionX(), me->GetPositionY(), DRAGON_REALM_Z, me->GetOrientation());
me->SetPosition(me->GetPositionX(), me->GetPositionY(), DRAGON_REALM_Z, me->GetOrientation());
TeleportAllPlayersBack();
if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
{
@@ -335,7 +335,7 @@ class boss_hexlord_malacrass : public CreatureScript
else
{
creature->AI()->EnterEvadeMode();
creature->GetMap()->CreatureRelocation(me, Pos_X[i], POS_Y, POS_Z, ORIENT);
creature->SetPosition(Pos_X[i], POS_Y, POS_Z, ORIENT);
creature->StopMoving();
}
}
@@ -185,7 +185,7 @@ class boss_marli : public CreatureScript
if (target)
{
DoCast(target, SPELL_CHARGE);
//me->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
//me->SetPosition(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
//me->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, true, 1);
AttackStart(target);
}
@@ -107,10 +107,10 @@ public:
{
if (summoned->GetEntry() == ENTRY_HIGHBORNE_BUNNY)
{
if (Unit* target = Unit::GetUnit(*summoned, targetGUID))
if (Creature* target = Unit::GetCreature(*summoned, targetGUID))
{
target->SendMonsterMove(target->GetPositionX(), target->GetPositionY(), me->GetPositionZ()+15.0f, 0);
target->GetMap()->CreatureRelocation(me, target->GetPositionX(), target->GetPositionY(), me->GetPositionZ()+15.0f, 0.0f);
target->SetPosition(target->GetPositionX(), target->GetPositionY(), me->GetPositionZ()+15.0f, 0.0f);
summoned->CastSpell(target, SPELL_RIBBON_OF_SOULS, false);
}
@@ -187,7 +187,7 @@ public:
{
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
me->SendMonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, 5000);
me->GetMap()->CreatureRelocation(me, me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, me->GetOrientation());
me->SetPosition(me->GetPositionX(), me->GetPositionY(), HIGHBORNE_LOC_Y_NEW, me->GetOrientation());
EventMove = false;
} else EventMove_Timer -= diff;
}