Merge branch 'master' of https://github.com/TrinityCore/TrinityCore
This commit is contained in:
@@ -1092,7 +1092,7 @@ void GameObject::Use(Unit* user)
|
||||
if (user->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
if (!ChairListSlots.size()) // this is called once at first chair use to make list of available slots
|
||||
if (ChairListSlots.empty()) // this is called once at first chair use to make list of available slots
|
||||
{
|
||||
if (info->chair.slots > 0) // sometimes chairs in DB have error in fields and we dont know number of slots
|
||||
for (uint32 i = 0; i < info->chair.slots; ++i)
|
||||
|
||||
@@ -18588,7 +18588,7 @@ void Player::_SaveMail(SQLTransaction& trans)
|
||||
{
|
||||
trans->PAppend("UPDATE mail SET has_items = '%u', expire_time = '" UI64FMTD "', deliver_time = '" UI64FMTD "', money = '%u', cod = '%u', checked = '%u' WHERE id = '%u'",
|
||||
m->HasItems() ? 1 : 0, (uint64)m->expire_time, (uint64)m->deliver_time, m->money, m->COD, m->checked, m->messageID);
|
||||
if (m->removedItems.size())
|
||||
if (!m->removedItems.empty())
|
||||
{
|
||||
for (std::vector<uint32>::iterator itr2 = m->removedItems.begin(); itr2 != m->removedItems.end(); ++itr2)
|
||||
trans->PAppend("DELETE FROM mail_items WHERE item_guid = '%u'", *itr2);
|
||||
@@ -23436,9 +23436,9 @@ void Player::UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 mis
|
||||
GetAchievementMgr().UpdateAchievementCriteria(type, miscValue1, miscValue2, unit);
|
||||
}
|
||||
|
||||
void Player::CompletedAchievement(AchievementEntry const* entry, bool ignoreGMAllowAchievementConfig)
|
||||
void Player::CompletedAchievement(AchievementEntry const* entry)
|
||||
{
|
||||
GetAchievementMgr().CompletedAchievement(entry, ignoreGMAllowAchievementConfig);
|
||||
GetAchievementMgr().CompletedAchievement(entry);
|
||||
}
|
||||
|
||||
void Player::LearnTalent(uint32 talentId, uint32 talentRank)
|
||||
|
||||
@@ -2420,7 +2420,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
AchievementMgr& GetAchievementMgr() { return m_achievementMgr; }
|
||||
AchievementMgr const& GetAchievementMgr() const { return m_achievementMgr; }
|
||||
void UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1 = 0, uint32 miscValue2 = 0, Unit* unit = NULL);
|
||||
void CompletedAchievement(AchievementEntry const* entry, bool ignoreGMAllowAchievementConfig = false);
|
||||
void CompletedAchievement(AchievementEntry const* entry);
|
||||
|
||||
bool HasTitle(uint32 bitIndex);
|
||||
bool HasTitle(CharTitlesEntry const* title) { return HasTitle(title->bit_index); }
|
||||
|
||||
@@ -5633,12 +5633,12 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
triggered_spell_id = 70701;
|
||||
break;
|
||||
}
|
||||
// Essence of the Blood Queen
|
||||
case 70871:
|
||||
{
|
||||
target = this;
|
||||
triggered_spell_id = 70872;
|
||||
basepoints0 = CalculatePctN(int32(damage), triggerAmount);
|
||||
break;
|
||||
CastCustomSpell(70872, SPELLVALUE_BASE_POINT0, basepoints0, this);
|
||||
return true;
|
||||
}
|
||||
case 65032: // Boom aura (321 Boombot)
|
||||
{
|
||||
@@ -17144,8 +17144,10 @@ bool Unit::SetPosition(float x, float y, float z, float orientation, bool telepo
|
||||
|
||||
void Unit::SendThreatListUpdate()
|
||||
{
|
||||
if (uint32 count = getThreatManager().getThreatList().size())
|
||||
if (!getThreatManager().isThreatListEmpty())
|
||||
{
|
||||
uint32 count = getThreatManager().getThreatList().size();
|
||||
|
||||
//sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Send SMSG_THREAT_UPDATE Message");
|
||||
WorldPacket data(SMSG_THREAT_UPDATE, 8 + count * 8);
|
||||
data.append(GetPackGUID());
|
||||
@@ -17162,8 +17164,10 @@ void Unit::SendThreatListUpdate()
|
||||
|
||||
void Unit::SendChangeCurrentVictimOpcode(HostileReference* pHostileReference)
|
||||
{
|
||||
if (uint32 count = getThreatManager().getThreatList().size())
|
||||
if (!getThreatManager().isThreatListEmpty())
|
||||
{
|
||||
uint32 count = getThreatManager().getThreatList().size();
|
||||
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Send SMSG_HIGHEST_THREAT_UPDATE Message");
|
||||
WorldPacket data(SMSG_HIGHEST_THREAT_UPDATE, 8 + 8 + count * 8);
|
||||
data.append(GetPackGUID());
|
||||
|
||||
Reference in New Issue
Block a user