Merge remote-tracking branch 'origin/master' into mmaps

This commit is contained in:
Nay committed 2012-12-27 17:53:34 +00:00
commit 7e196e8e58
75 files changed
+21494 -223

No files matched your search

+13 -9
View File
@@ -17064,7 +17064,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
}
if (IsInMap(caster))
caster->CastCustomSpell(itr->second.spellId, SpellValueMod(SPELLVALUE_BASE_POINT0+i), seatId+1, target, GetVehicleKit() ? TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE : TRIGGERED_NONE, NULL, NULL, origCasterGUID);
caster->CastCustomSpell(itr->second.spellId, SpellValueMod(SPELLVALUE_BASE_POINT0+i), seatId, target, GetVehicleKit() ? TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE : TRIGGERED_NONE, NULL, NULL, origCasterGUID);
else // This can happen during Player::_LoadAuras
{
int32 bp0 = seatId;
@@ -17094,7 +17094,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
void Unit::EnterVehicle(Unit* base, int8 seatId)
{
CastCustomSpell(VEHICLE_SPELL_RIDE_HARDCODED, SPELLVALUE_BASE_POINT0, seatId+1, base, TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE);
CastCustomSpell(VEHICLE_SPELL_RIDE_HARDCODED, SPELLVALUE_BASE_POINT0, seatId, base, TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE);
}
void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* aurApp)
@@ -17324,23 +17324,27 @@ void Unit::NearTeleportTo(float x, float y, float z, float orientation, bool cas
ToPlayer()->TeleportTo(GetMapId(), x, y, z, orientation, TELE_TO_NOT_LEAVE_TRANSPORT | TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET | (casting ? TELE_TO_SPELL : 0));
else
{
UpdatePosition(x, y, z, orientation, true);
Position pos; // dummy, not used for creatures.
Position pos = {x, y, z, orientation};
SendTeleportPacket(pos);
UpdatePosition(x, y, z, orientation, true);
UpdateObjectVisibility();
}
}
void Unit::SendTeleportPacket(Position& oldPos)
void Unit::SendTeleportPacket(Position& pos)
{
Position oldPos = { GetPositionX(), GetPositionY(), GetPositionZMinusOffset(), GetOrientation() };
if (GetTypeId() == TYPEID_UNIT)
Relocate(&pos);
WorldPacket data2(MSG_MOVE_TELEPORT, 38);
data2.append(GetPackGUID());
BuildMovementPacket(&data2);
if (GetTypeId() == TYPEID_PLAYER)
if (GetTypeId() == TYPEID_UNIT)
Relocate(&oldPos);
SendMessageToSet(&data2, false);
if (GetTypeId() == TYPEID_PLAYER)
Relocate(&pos);
SendMessageToSet(&data2, true);
}
bool Unit::UpdatePosition(float x, float y, float z, float orientation, bool teleport)