Merge branch 'master' of https://github.com/TrinityCore/TrinityCore
This commit is contained in:
@@ -15017,8 +15017,8 @@ bool Player::SatisfyQuestExclusiveGroup(Quest const* qInfo, bool msg)
|
||||
return false;
|
||||
}
|
||||
|
||||
// alternative quest already started or completed
|
||||
if (m_QuestStatus.find(exclude_Id) != m_QuestStatus.end() || m_RewardedQuests.find(exclude_Id) != m_RewardedQuests.end())
|
||||
// alternative quest already started or completed - but don't check rewarded states if both are repeatable
|
||||
if (m_QuestStatus.find(exclude_Id) != m_QuestStatus.end() || (!(qInfo->IsRepeatable() && Nquest->IsRepeatable()) && m_RewardedQuests.find(exclude_Id) != m_RewardedQuests.end()))
|
||||
{
|
||||
if (msg)
|
||||
SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ);
|
||||
|
||||
@@ -1936,6 +1936,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
bool isHonorOrXPTarget(Unit* pVictim);
|
||||
|
||||
bool GetsRecruitAFriendBonus(bool forXP);
|
||||
uint8 GetGrantableLevels() { return GetByteValue(PLAYER_FIELD_BYTES, 1); }
|
||||
|
||||
ReputationMgr& GetReputationMgr() { return m_reputationMgr; }
|
||||
ReputationMgr const& GetReputationMgr() const { return m_reputationMgr; }
|
||||
|
||||
@@ -418,11 +418,11 @@ void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 M
|
||||
void Unit::SendMonsterMoveTransport(Unit *vehicleOwner)
|
||||
{
|
||||
// TODO: Turn into BuildMonsterMoveTransport packet and allow certain variables (for npc movement aboard vehicles)
|
||||
WorldPacket data(SMSG_MONSTER_MOVE_TRANSPORT, GetPackGUID().size()+vehicleOwner->GetPackGUID().size());
|
||||
WorldPacket data(SMSG_MONSTER_MOVE_TRANSPORT, GetPackGUID().size()+vehicleOwner->GetPackGUID().size() + 47);
|
||||
data.append(GetPackGUID());
|
||||
data.append(vehicleOwner->GetPackGUID());
|
||||
data << int8(GetTransSeat());
|
||||
data << uint8(0); // unk boolean
|
||||
data << uint8(0); // unk boolean
|
||||
data << GetPositionX() - vehicleOwner->GetPositionX();
|
||||
data << GetPositionY() - vehicleOwner->GetPositionY();
|
||||
data << GetPositionZ() - vehicleOwner->GetPositionZ();
|
||||
@@ -431,10 +431,10 @@ void Unit::SendMonsterMoveTransport(Unit *vehicleOwner)
|
||||
data << GetTransOffsetO(); // facing angle?
|
||||
data << uint32(SPLINEFLAG_TRANSPORT);
|
||||
data << uint32(0); // move time
|
||||
data << uint32(1);
|
||||
data << uint32(GetTransOffsetX());
|
||||
data << uint32(GetTransOffsetY());
|
||||
data << uint32(GetTransOffsetZ());
|
||||
data << uint32(1); // amount of waypoints
|
||||
data << GetTransOffsetX();
|
||||
data << GetTransOffsetY();
|
||||
data << GetTransOffsetZ();
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
@@ -6493,10 +6493,9 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
return false;
|
||||
}
|
||||
else if (damage > 0)
|
||||
{
|
||||
triggered_spell_id = 58597;
|
||||
target = this;
|
||||
}
|
||||
|
||||
target = this;
|
||||
break;
|
||||
}
|
||||
// Righteous Vengeance
|
||||
|
||||
@@ -1255,6 +1255,7 @@ class Unit : public WorldObject
|
||||
inline bool HealthAbovePct(int32 pct) const { return GetHealth() * (uint64)100 > GetMaxHealth() * (uint64)pct; }
|
||||
inline float GetHealthPct() const { return GetMaxHealth() ? 100.f * GetHealth() / GetMaxHealth() : 0.0f; }
|
||||
inline uint32 CountPctFromMaxHealth(int32 pct) const { return CalculatePctN(GetMaxHealth(), pct); }
|
||||
inline uint32 CountPctFromCurHealth(int32 pct) const { return CalculatePctN(GetHealth(), pct); }
|
||||
|
||||
void SetHealth(uint32 val);
|
||||
void SetMaxHealth(uint32 val);
|
||||
|
||||
@@ -423,17 +423,6 @@ void Vehicle::RemovePassenger(Unit *unit)
|
||||
sScriptMgr->OnRemovePassenger(this, unit);
|
||||
}
|
||||
|
||||
void Vehicle::EjectPassenger(Unit* passenger, Unit* controller)
|
||||
{
|
||||
SeatMap::const_iterator m_SeatsItr;
|
||||
for (m_SeatsItr = m_Seats.begin(); m_SeatsItr != m_Seats.end(); ++m_SeatsItr)
|
||||
if (m_SeatsItr->second.passenger == passenger)
|
||||
if (m_SeatsItr->second.seatInfo->IsEjectable())
|
||||
return passenger->ExitVehicle();
|
||||
else
|
||||
sLog->outError("Player %u attempted to eject unit GUID "UI64FMTD" from non-ejectable seat.", controller->GetGUIDLow(), passenger->GetGUID());
|
||||
}
|
||||
|
||||
void Vehicle::RelocatePassengers(float x, float y, float z, float ang)
|
||||
{
|
||||
Map *map = me->GetMap();
|
||||
@@ -443,6 +432,8 @@ void Vehicle::RelocatePassengers(float x, float y, float z, float ang)
|
||||
for (SeatMap::const_iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
|
||||
if (Unit *passenger = itr->second.passenger)
|
||||
{
|
||||
ASSERT(passenger->IsInWorld());
|
||||
|
||||
float px = x + passenger->m_movementInfo.t_pos.m_positionX;
|
||||
float py = y + passenger->m_movementInfo.t_pos.m_positionY;
|
||||
float pz = z + passenger->m_movementInfo.t_pos.m_positionZ;
|
||||
|
||||
Reference in New Issue
Block a user