mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-02 15:27:48 +00:00
Revert "Build/Clang: fixed 96 warnings + improved code readability"
This reverts commit a4589f71d5.
This commit is contained in:
@@ -2081,7 +2081,7 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert
|
||||
summon->SetHomePosition(pos);
|
||||
|
||||
summon->InitStats(duration);
|
||||
AddToMap(summon->ToCreature(), (IS_PLAYER_GUID(summon->GetOwnerGUID()) || (summoner && summoner->GetTransport())));
|
||||
AddToMap(summon->ToCreature(), (IS_PLAYER_GUID(summon->GetOwnerGUID()) || summoner && summoner->GetTransport()));
|
||||
summon->InitSummon();
|
||||
|
||||
//ObjectAccessor::UpdateObjectVisibility(summon);
|
||||
|
||||
@@ -4190,8 +4190,8 @@ void Player::removeSpell(uint32 spellId, uint8 removeSpecMask, bool onlyTemporar
|
||||
continue;
|
||||
|
||||
// pussywizard: don't understand why whole skill is removed when just single spell from it is removed
|
||||
if ((_spell_idx->second->learnOnGetSkill == ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL && pSkill->categoryId != SKILL_CATEGORY_CLASS) || // pussywizard: don't unlearn class skills
|
||||
((pSkill->id == SKILL_LOCKPICKING || pSkill->id == SKILL_RUNEFORGING) && _spell_idx->second->max_value == 0))
|
||||
if (_spell_idx->second->learnOnGetSkill == ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL && pSkill->categoryId != SKILL_CATEGORY_CLASS || // pussywizard: don't unlearn class skills
|
||||
(pSkill->id == SKILL_LOCKPICKING || pSkill->id == SKILL_RUNEFORGING) && _spell_idx->second->max_value == 0)
|
||||
{
|
||||
// not reset skills for professions and racial abilities
|
||||
if ((pSkill->categoryId == SKILL_CATEGORY_SECONDARY || pSkill->categoryId == SKILL_CATEGORY_PROFESSION) && (IsProfessionSkill(pSkill->id) || _spell_idx->second->racemask != 0))
|
||||
@@ -17486,8 +17486,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(mapId);
|
||||
|
||||
// pussywizard: group changed difficulty when player was offline, teleport to the enterance of new difficulty
|
||||
if (mapEntry && ((mapEntry->IsNonRaidDungeon() && dungeonDiff != GetDungeonDifficulty()) ||
|
||||
(mapEntry->IsRaid() && raidDiff != GetRaidDifficulty())))
|
||||
if (mapEntry && (mapEntry->IsNonRaidDungeon() && dungeonDiff != GetDungeonDifficulty() || mapEntry->IsRaid() && raidDiff != GetRaidDifficulty()))
|
||||
{
|
||||
bool fixed = false;
|
||||
if (uint32 destInstId = sInstanceSaveMgr->PlayerGetDestinationInstanceId(this, mapId, GetDifficulty(mapEntry->IsRaid())))
|
||||
@@ -22833,9 +22832,7 @@ void Player::ApplyEquipCooldown(Item* pItem)
|
||||
|
||||
// xinef: dont apply equip cooldown if spell on item has insignificant cooldown
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellData.SpellId);
|
||||
if (spellData.SpellCooldown <= 3000 &&
|
||||
spellData.SpellCategoryCooldown <= 3000 &&
|
||||
(!spellInfo || (spellInfo->RecoveryTime <= 3000 && spellInfo->CategoryRecoveryTime <= 3000)))
|
||||
if (spellData.SpellCooldown <= 3000 && spellData.SpellCategoryCooldown <= 3000 && (!spellInfo || spellInfo->RecoveryTime <= 3000 && spellInfo->CategoryRecoveryTime <= 3000))
|
||||
continue;
|
||||
|
||||
// Don't replace longer cooldowns by equip cooldown if we have any.
|
||||
@@ -26366,10 +26363,7 @@ uint8 Player::GetMostPointsTalentTree() const
|
||||
bool Player::IsHealerTalentSpec() const
|
||||
{
|
||||
uint8 tree = GetMostPointsTalentTree();
|
||||
return ((getClass() == CLASS_DRUID && tree == 2) ||
|
||||
(getClass() == CLASS_PALADIN && tree == 0) ||
|
||||
(getClass() == CLASS_PRIEST && tree <= 1) ||
|
||||
(getClass() == CLASS_SHAMAN && tree == 2));
|
||||
return (getClass() == CLASS_DRUID && tree == 2 || getClass() == CLASS_PALADIN && tree == 0 || getClass() == CLASS_PRIEST && tree <= 1 || getClass() == CLASS_SHAMAN && tree == 2);
|
||||
}
|
||||
|
||||
void Player::ResetTimeSync()
|
||||
|
||||
@@ -3368,16 +3368,13 @@ bool Unit::isInAccessiblePlaceFor(Creature const* c) const
|
||||
else if (c->GetMapId() == 631) // Icecrown Citadel
|
||||
{
|
||||
// if static transport doesn't match - return false
|
||||
if (c->GetTransport() != this->GetTransport() &&
|
||||
((c->GetTransport() && c->GetTransport()->IsStaticTransport()) ||
|
||||
(this->GetTransport() && this->GetTransport()->IsStaticTransport())))
|
||||
if (c->GetTransport() != this->GetTransport() && (c->GetTransport() && c->GetTransport()->IsStaticTransport() || this->GetTransport() && this->GetTransport()->IsStaticTransport()))
|
||||
return false;
|
||||
|
||||
// special handling for ICC (map 631), for non-flying pets in Gunship Battle, for trash npcs this is done via CanAIAttack
|
||||
if (IS_PLAYER_GUID(c->GetOwnerGUID()) && !c->CanFly())
|
||||
{
|
||||
if ((c->GetTransport() && !this->GetTransport()) ||
|
||||
(!c->GetTransport() && this->GetTransport()))
|
||||
if (c->GetTransport() && !this->GetTransport() || !c->GetTransport() && this->GetTransport())
|
||||
return false;
|
||||
if (this->GetTransport())
|
||||
{
|
||||
@@ -3662,7 +3659,7 @@ void Unit::HandleSafeUnitPointersOnDelete(Unit* thisUnit)
|
||||
bool Unit::IsInWater(bool allowAbove) const
|
||||
{
|
||||
const_cast<Unit*>(this)->UpdateEnvironmentIfNeeded(1);
|
||||
return m_last_isinwater_status || (allowAbove && m_last_islittleabovewater_status);
|
||||
return m_last_isinwater_status || allowAbove && m_last_islittleabovewater_status;
|
||||
}
|
||||
|
||||
bool Unit::IsUnderWater() const
|
||||
@@ -10377,8 +10374,7 @@ float Unit::SpellPctDamageModsDone(Unit* victim, SpellInfo const* spellProto, Da
|
||||
// Merciless Combat
|
||||
if ((*i)->GetSpellInfo()->SpellIconID == 2656)
|
||||
{
|
||||
if (spellProto &&
|
||||
((spellProto->SpellFamilyFlags[0] & 0x2) || (spellProto->SpellFamilyFlags[1] & 0x2)))
|
||||
if( spellProto && spellProto->SpellFamilyFlags[0] & 0x2 || spellProto->SpellFamilyFlags[1] & 0x2 )
|
||||
if (!victim->HealthAbovePct(35))
|
||||
AddPct(DoneTotalMod, (*i)->GetAmount());
|
||||
}
|
||||
|
||||
@@ -2368,13 +2368,7 @@ class Unit : public WorldObject
|
||||
// pussywizard:
|
||||
// MMaps
|
||||
std::map<uint64, MMapTargetData> m_targetsNotAcceptable;
|
||||
bool isTargetNotAcceptableByMMaps(uint64 guid, uint32 currTime, const Position* t = NULL) const {
|
||||
std::map<uint64, MMapTargetData>::const_iterator itr = m_targetsNotAcceptable.find(guid);
|
||||
if ((itr != m_targetsNotAcceptable.end() && (itr->second._endTime >= currTime)) ||
|
||||
(t && !itr->second.PosChanged(*this, *t)))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
bool isTargetNotAcceptableByMMaps(uint64 guid, uint32 currTime, const Position* t = NULL) const { std::map<uint64, MMapTargetData>::const_iterator itr = m_targetsNotAcceptable.find(guid); if (itr != m_targetsNotAcceptable.end() && (itr->second._endTime >= currTime || t && !itr->second.PosChanged(*this, *t))) return true; return false; }
|
||||
uint32 m_mmapNotAcceptableStartTime;
|
||||
// Safe mover
|
||||
std::set<SafeUnitPointer*> SafeUnitPointerSet;
|
||||
|
||||
Reference in New Issue
Block a user