Merge remote-tracking branch 'origin/master' into 4.3.4
Conflicts: src/server/game/Entities/Unit/Unit.cpp src/server/scripts/Commands/cs_reload.cpp
This commit is contained in:
commit
cc28161670
17 files changed
+64
-68
No files matched your search
@@ -378,11 +378,6 @@ void Unit::MonsterMoveWithSpeed(float x, float y, float z, float speed)
|
||||
init.Launch();
|
||||
}
|
||||
|
||||
enum MovementIntervals
|
||||
{
|
||||
POSITION_UPDATE_DELAY = 400,
|
||||
};
|
||||
|
||||
void Unit::UpdateSplineMovement(uint32 t_diff)
|
||||
{
|
||||
if (movespline->Finalized())
|
||||
@@ -401,7 +396,9 @@ void Unit::UpdateSplineMovement(uint32 t_diff)
|
||||
|
||||
void Unit::UpdateSplinePosition()
|
||||
{
|
||||
m_movesplineTimer.Reset(POSITION_UPDATE_DELAY);
|
||||
uint32 const positionUpdateDelay = 400;
|
||||
|
||||
m_movesplineTimer.Reset(positionUpdateDelay);
|
||||
Movement::Location loc = movespline->ComputePosition();
|
||||
if (GetTransGUID())
|
||||
{
|
||||
@@ -545,12 +542,11 @@ uint32 Unit::DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDam
|
||||
GetAI()->DamageDealt(victim, damage, damagetype);
|
||||
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (victim->ToPlayer()->GetCommandStatus(CHEAT_GOD))
|
||||
return 0;
|
||||
|
||||
// Signal to pets that their owner was attacked
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
// Signal to pets that their owner was attacked
|
||||
Pet* pet = victim->ToPlayer()->GetPet();
|
||||
|
||||
if (pet && pet->isAlive())
|
||||
@@ -6438,6 +6434,9 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
}
|
||||
switch (dummySpell->Id)
|
||||
{
|
||||
if (!victim)
|
||||
return false;
|
||||
|
||||
// Holy Power (Redemption Armor set)
|
||||
case 28789:
|
||||
{
|
||||
@@ -15398,7 +15397,8 @@ void Unit::RemoveCharmedBy(Unit* charmer)
|
||||
|
||||
if (Creature* creature = ToCreature())
|
||||
{
|
||||
creature->AI()->OnCharmed(false);
|
||||
if (creature->AI())
|
||||
creature->AI()->OnCharmed(false);
|
||||
|
||||
if (type != CHARM_TYPE_VEHICLE) // Vehicles' AI is never modified
|
||||
{
|
||||
@@ -16471,6 +16471,7 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
|
||||
sLog->outDebug(LOG_FILTER_VEHICLES, "EnterVehicle: %u leave vehicle %u seat %d and enter %d.", GetEntry(), m_vehicle->GetBase()->GetEntry(), GetTransSeat(), seatId);
|
||||
ChangeSeat(seatId);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -16506,6 +16507,7 @@ void Unit::_EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* a
|
||||
|
||||
ASSERT(!m_vehicle);
|
||||
m_vehicle = vehicle;
|
||||
|
||||
if (!m_vehicle->AddPassenger(this, seatId))
|
||||
{
|
||||
m_vehicle = NULL;
|
||||
@@ -16558,9 +16560,11 @@ void Unit::_ExitVehicle(Position const* exitPosition)
|
||||
|
||||
m_vehicle->RemovePassenger(this);
|
||||
|
||||
Player* player = ToPlayer();
|
||||
|
||||
// If player is on mouted duel and exits the mount should immediatly lose the duel
|
||||
if (GetTypeId() == TYPEID_PLAYER && ToPlayer()->duel && ToPlayer()->duel->isMounted)
|
||||
ToPlayer()->DuelComplete(DUEL_FLED);
|
||||
if (player && player->duel && player->duel->isMounted)
|
||||
player->DuelComplete(DUEL_FLED);
|
||||
|
||||
// This should be done before dismiss, because there may be some aura removal
|
||||
Vehicle* vehicle = m_vehicle;
|
||||
@@ -16577,8 +16581,8 @@ void Unit::_ExitVehicle(Position const* exitPosition)
|
||||
|
||||
AddUnitState(UNIT_STATE_MOVE);
|
||||
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
ToPlayer()->SetFallInformation(0, GetPositionZ());
|
||||
if (player)
|
||||
player->SetFallInformation(0, GetPositionZ());
|
||||
else if (HasUnitMovementFlag(MOVEMENTFLAG_ROOT))
|
||||
{
|
||||
WorldPacket data(SMSG_SPLINE_MOVE_UNROOT, 8);
|
||||
@@ -16594,7 +16598,7 @@ void Unit::_ExitVehicle(Position const* exitPosition)
|
||||
|
||||
//GetMotionMaster()->MoveFall(); // Enable this once passenger positions are calculater properly (see above)
|
||||
|
||||
if (Player* player = ToPlayer())
|
||||
if (player)
|
||||
player->ResummonPetTemporaryUnSummonedIfAny();
|
||||
|
||||
if (vehicle->GetBase()->HasUnitTypeMask(UNIT_MASK_MINION))
|
||||
|
||||
Reference in new issue
Block a user