This commit is contained in:
QAston
2011-06-28 16:18:42 +02:00
37 changed files with 679 additions and 615 deletions
+17 -7
View File
@@ -15630,7 +15630,12 @@ void Unit::SetStunned(bool apply)
SetUInt64Value(UNIT_FIELD_TARGET, 0);
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
// AddUnitMovementFlag(MOVEMENTFLAG_ROOT);
// MOVEMENTFLAG_ROOT cannot be used in conjunction with
// MOVEMENTFLAG_FORWARD, MOVEMENTFLAG_BACKWARD, MOVEMENTFLAG_STRAFE_LEFT, MOVEMENTFLAG_STRAFE RIGHT (tested 3.3.5a)
// this will freeze clients. That's why we remove any current movement flags before
// setting MOVEMENTFLAG_ROOT
RemoveUnitMovementFlag(MOVEMENTFLAG_FORWARD | MOVEMENTFLAG_BACKWARD | MOVEMENTFLAG_STRAFE_LEFT | MOVEMENTFLAG_STRAFE_RIGHT);
AddUnitMovementFlag(MOVEMENTFLAG_ROOT);
// Creature specific
if (GetTypeId() != TYPEID_PLAYER)
@@ -15662,7 +15667,7 @@ void Unit::SetStunned(bool apply)
data << uint32(0);
SendMessageToSet(&data, true);
// RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT);
RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT);
}
}
}
@@ -15674,7 +15679,12 @@ void Unit::SetRooted(bool apply)
if (m_rootTimes > 0) // blizzard internal check?
m_rootTimes++;
// AddUnitMovementFlag(MOVEMENTFLAG_ROOT);
// MOVEMENTFLAG_ROOT cannot be used in conjunction with
// MOVEMENTFLAG_FORWARD, MOVEMENTFLAG_BACKWARD, MOVEMENTFLAG_STRAFE_LEFT, MOVEMENTFLAG_STRAFE RIGHT (tested 3.3.5a)
// this will freeze clients. That's why we remove any current movement flags before
// setting MOVEMENTFLAG_ROOT
RemoveUnitMovementFlag(MOVEMENTFLAG_FORWARD | MOVEMENTFLAG_BACKWARD | MOVEMENTFLAG_STRAFE_LEFT | MOVEMENTFLAG_STRAFE_RIGHT);
AddUnitMovementFlag(MOVEMENTFLAG_ROOT);
if (GetTypeId() == TYPEID_PLAYER)
{
@@ -15709,7 +15719,7 @@ void Unit::SetRooted(bool apply)
SendMessageToSet(&data, true);
}
// RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT);
RemoveUnitMovementFlag(MOVEMENTFLAG_ROOT);
}
}
}
@@ -16804,7 +16814,7 @@ bool Unit::CheckPlayerCondition(Player* pPlayer)
bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
{
bool success = false;
uint32 spellClickEntry = GetVehicleKit() ? GetVehicleKit()->m_creatureEntry : GetEntry();
uint32 spellClickEntry = GetVehicleKit() ? GetVehicleKit()->GetCreatureEntry() : GetEntry();
SpellClickInfoMapBounds clickPair = sObjectMgr->GetSpellClickInfoMapBounds(spellClickEntry);
for (SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
{
@@ -17284,8 +17294,8 @@ void Unit::OutDebugInfo() const
if (IsVehicle())
{
sLog->outStringInLine("Passenger List: ");
for (SeatMap::iterator itr = GetVehicleKit()->m_Seats.begin(); itr != GetVehicleKit()->m_Seats.end(); ++itr)
if (Unit* passenger = ObjectAccessor::GetUnit(*GetVehicleBase(), itr->second.passenger))
for (SeatMap::iterator itr = GetVehicleKit()->Seats.begin(); itr != GetVehicleKit()->Seats.end(); ++itr)
if (Unit* passenger = ObjectAccessor::GetUnit(*GetVehicleBase(), itr->second.Passenger))
sLog->outStringInLine(UI64FMTD", ", passenger->GetGUID());
sLog->outString();
}