mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
refactor(Core): Improve readability (#22691)
This commit is contained in:
@@ -895,7 +895,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
go->SetLootState(GO_READY);
|
||||
}
|
||||
|
||||
go->UseDoorOrButton(0, !!e.action.activateObject.alternative, unit);
|
||||
go->UseDoorOrButton(0, e.action.activateObject.alternative, unit);
|
||||
LOG_DEBUG("sql.sql", "SmartScript::ProcessAction:: SMART_ACTION_ACTIVATE_GOBJECT. Gameobject {} activated", go->GetGUID().ToString());
|
||||
}
|
||||
}
|
||||
@@ -1485,14 +1485,14 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
{
|
||||
for (WorldObject* target : targets)
|
||||
if (IsUnit(target))
|
||||
target->ToUnit()->SetVisible(!!e.action.visibility.state);
|
||||
target->ToUnit()->SetVisible(e.action.visibility.state);
|
||||
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_ACTIVE:
|
||||
{
|
||||
for (WorldObject* target : targets)
|
||||
target->setActive(!!e.action.setActive.state);
|
||||
target->setActive(e.action.setActive.state);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_ATTACK_START:
|
||||
|
||||
@@ -488,7 +488,7 @@ void AuctionHouseObject::AddAuction(AuctionEntry* auction)
|
||||
|
||||
bool AuctionHouseObject::RemoveAuction(AuctionEntry* auction)
|
||||
{
|
||||
bool wasInMap = !!_auctionsMap.erase(auction->Id);
|
||||
bool wasInMap = _auctionsMap.erase(auction->Id);
|
||||
sAuctionMgr->GetAuctionHouseSearcher()->RemoveAuction(auction);
|
||||
|
||||
sScriptMgr->OnAuctionRemove(this, auction);
|
||||
|
||||
@@ -206,7 +206,7 @@ bool Acore::Hyperlinks::LinkTags::spell::StoreTo(SpellInfo const*& val, std::str
|
||||
if (!(t.TryConsumeTo(spellId) && t.IsEmpty()))
|
||||
return false;
|
||||
|
||||
return !!(val = sSpellMgr->GetSpellInfo(spellId));
|
||||
return (val = sSpellMgr->GetSpellInfo(spellId));
|
||||
}
|
||||
|
||||
bool Acore::Hyperlinks::LinkTags::talent::StoreTo(TalentLinkData& val, std::string_view text)
|
||||
|
||||
@@ -68,7 +68,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
|
||||
{
|
||||
// don't allow 0 items (it's checked during table load)
|
||||
ASSERT(ConditionValue2);
|
||||
bool checkBank = !!ConditionValue3;
|
||||
bool checkBank = ConditionValue3;
|
||||
condMeets = player->HasItemCount(ConditionValue1, ConditionValue2, checkBank);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ struct FormationInfo
|
||||
uint32 point_1;
|
||||
uint32 point_2;
|
||||
|
||||
bool HasGroupFlag(uint16 flag) const { return !!(groupAI & flag); }
|
||||
bool HasGroupFlag(uint16 flag) const { return (groupAI & flag); }
|
||||
};
|
||||
|
||||
typedef std::unordered_map<ObjectGuid::LowType/*memberDBGUID*/, FormationInfo /*formationInfo*/> CreatureGroupInfoType;
|
||||
|
||||
@@ -1692,7 +1692,7 @@ public:
|
||||
|
||||
bool RemoveMItem(ObjectGuid::LowType itemLowGuid)
|
||||
{
|
||||
return !!mMitems.erase(itemLowGuid);
|
||||
return mMitems.erase(itemLowGuid);
|
||||
}
|
||||
|
||||
void PetSpellInitialize();
|
||||
|
||||
Reference in New Issue
Block a user