Skip to content

Commit

Permalink
Chore: clang-format-15 pass
Browse files Browse the repository at this point in the history
  • Loading branch information
zach2good committed Apr 1, 2024
1 parent 70dc1f9 commit a2b4b62
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
10 changes: 5 additions & 5 deletions src/map/ai/ai_container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ bool CAIContainer::Untargetable(duration _duration, bool canChangeState)

bool CAIContainer::Internal_Engage(uint16 targetid)
{
// #TODO: pet engage/disengage
// TODO: pet engage/disengage
auto* entity = dynamic_cast<CBattleEntity*>(PEntity);

if (entity && entity->PAI->IsEngaged())
Expand All @@ -197,10 +197,10 @@ bool CAIContainer::Internal_Engage(uint16 targetid)
}
return false;
}
// #TODO: use valid target stuff from spell
// TODO: use valid target stuff from spell
if (entity)
{
// #TODO: remove m_battleTarget if possible (need to check disengage)
// TODO: remove m_battleTarget if possible (need to check disengage)
// Check if an entity can change to the attack state
// Allow entity with prevent action effect to very briefly switch to the attack state to be properly engaged
if (CanChangeState() || (GetCurrentState() && GetCurrentState()->IsCompleted()) || entity->StatusEffectContainer->HasPreventActionEffect(true))
Expand Down Expand Up @@ -417,11 +417,11 @@ void CAIContainer::Tick(time_point _tick)
m_PrevTick = m_Tick;
m_Tick = _tick;

// #TODO: timestamp in the event?
// TODO: timestamp in the event?
EventHandler.triggerListener("TICK", CLuaBaseEntity(PEntity));
PEntity->Tick(_tick);

// #TODO: check this in the controller instead maybe? (might not want to check every tick)
// TODO: check this in the controller instead maybe? (might not want to check every tick)
ActionQueue.checkAction(_tick);

// check pathfinding only if there is no controller to do it
Expand Down
8 changes: 4 additions & 4 deletions src/map/ai/controllers/mob_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void CMobController::TryLink()
if (PPartyMember->m_roamFlags & ROAMFLAG_IGNORE)
{
// force into attack action
// #TODO
// TODO
PPartyMember->PAI->Engage(PTarget->targid);
}
}
Expand Down Expand Up @@ -692,7 +692,7 @@ void CMobController::Move()

if (((currentDistance > closeDistance) || move) && PMob->PAI->CanFollowPath())
{
// #TODO: can this be moved to scripts entirely?
// TODO: can this be moved to scripts entirely?
if (PMob->getMobMod(MOBMOD_DRAW_IN) > 0)
{
if (currentDistance >= PMob->GetMeleeRange() * 2 && battleutils::DrawIn(PTarget, PMob, PMob->GetMeleeRange() - 0.2f))
Expand Down Expand Up @@ -844,7 +844,7 @@ void CMobController::DoRoamTick(time_point tick)

return;
}
// #TODO
// TODO
else if (PMob->GetDespawnTime() > time_point::min() && PMob->GetDespawnTime() < m_Tick)
{
Despawn();
Expand Down Expand Up @@ -959,7 +959,7 @@ void CMobController::DoRoamTick(time_point tick)
else if (PMob->CanRoam() && PMob->PAI->PathFind->RoamAround(PMob->m_SpawnPoint, PMob->GetRoamDistance(),
(uint8)PMob->getMobMod(MOBMOD_ROAM_TURNS), PMob->m_roamFlags))
{
// #TODO: #AIToScript (event probably)
// TODO: #AIToScript (event probably)
if (PMob->m_roamFlags & ROAMFLAG_WORM)
{
// move down
Expand Down
2 changes: 1 addition & 1 deletion src/map/ai/controllers/pet_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CPetController::CPetController(CPetEntity* _PPet)
: CMobController(_PPet)
, PPet(_PPet)
{
// #TODO: this probably will have to depend on pet type (automaton does WS on its own..)
// TODO: this probably will have to depend on pet type (automaton does WS on its own..)
SetWeaponSkillEnabled(false);
}

Expand Down
4 changes: 2 additions & 2 deletions src/map/ai/controllers/player_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ bool CPlayerController::Cast(uint16 targid, SpellID spellid)

bool CPlayerController::Engage(uint16 targid)
{
//#TODO: pet engage/disengage
// TODO: pet engage/disengage
std::unique_ptr<CBasicPacket> errMsg;
auto* PChar = static_cast<CCharEntity*>(POwner);
auto* PTarget = PChar->IsValidTarget(targid, TARGET_ENEMY, errMsg);
Expand Down Expand Up @@ -183,7 +183,7 @@ bool CPlayerController::WeaponSkill(uint16 targid, uint16 wsid)
auto* PChar = static_cast<CCharEntity*>(POwner);
if (PChar->PAI->CanChangeState())
{
//#TODO: put all this in weaponskill_state
// TODO: put all this in weaponskill_state
CWeaponSkill* PWeaponSkill = battleutils::GetWeaponSkill(wsid);

if (PWeaponSkill == nullptr)
Expand Down
2 changes: 1 addition & 1 deletion src/map/ai/states/weaponskill_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,5 @@ bool CWeaponSkillState::Update(time_point tick)

void CWeaponSkillState::Cleanup(time_point tick)
{
//#TODO: interrupt an in progress ws
// TODO: interrupt an in progress ws
}
8 changes: 4 additions & 4 deletions src/map/entities/charentity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ void CCharEntity::OnWeaponSkillFinished(CWeaponSkillState& state, action_t& acti
}

PAI->TargetFind->reset();
// #TODO: revise parameters
// TODO: revise parameters
if (PWeaponSkill->isAoE())
{
PAI->TargetFind->findWithinArea(PBattleTarget, AOE_RADIUS::TARGET, 10);
Expand Down Expand Up @@ -1549,7 +1549,7 @@ void CCharEntity::OnAbility(CAbilityState& state, action_t& action)
action.actiontype = PAbility->getActionType();
action.actionid = PAbility->getID();

// #TODO: get rid of this to script, too
// TODO: get rid of this to script, too
if (PAbility->isPetAbility())
{
CPetEntity* PPetEntity = dynamic_cast<CPetEntity*>(PPet);
Expand Down Expand Up @@ -1639,7 +1639,7 @@ void CCharEntity::OnAbility(CAbilityState& state, action_t& action)
PPet->PAI->MobSkill(PPetTarget, PAbility->getMobSkillID());
}
}
// #TODO: make this generic enough to not require an if
// TODO: make this generic enough to not require an if
else if ((PAbility->isAoE() || (PAbility->getID() == ABILITY_LIEMENT && getMod(Mod::LIEMENT_EXTENDS_TO_AREA) > 0)) && this->PParty != nullptr)
{
PAI->TargetFind->reset();
Expand Down Expand Up @@ -1742,7 +1742,7 @@ void CCharEntity::OnAbility(CAbilityState& state, action_t& action)

pushPacket(new CCharRecastPacket(this));

// #TODO: refactor
// TODO: refactor
// if (this->getMijinGakure())
//{
// m_ActionType = ACTION_FALL;
Expand Down
8 changes: 4 additions & 4 deletions src/map/packet_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2718,8 +2718,8 @@ void SmallPacket0x04D(map_session_data_t* const PSession, CCharEntity* const PCh
{
uint32 charid = _sql->GetUIntData(0);
ret = _sql->Query(
"UPDATE delivery_box SET sent = 0 WHERE charid = %u AND box = 2 AND slot = %u AND sent = 1 AND received = 0 LIMIT 1",
PChar->id, slotID);
"UPDATE delivery_box SET sent = 0 WHERE charid = %u AND box = 2 AND slot = %u AND sent = 1 AND received = 0 LIMIT 1",
PChar->id, slotID);

if (ret != SQL_ERROR && _sql->AffectedRows() == 1)
{
Expand Down Expand Up @@ -4670,8 +4670,8 @@ void SmallPacket0x071(map_session_data_t* const PSession, CCharEntity* const PCh
{
uint32 charid = _sql->GetUIntData(0);
ret = _sql->Query(
"SELECT partyid FROM accounts_parties WHERE charid = %u AND allianceid = %u AND partyflag & %d",
charid, PChar->PParty->m_PAlliance->m_AllianceID, PARTY_LEADER | PARTY_SECOND | PARTY_THIRD);
"SELECT partyid FROM accounts_parties WHERE charid = %u AND allianceid = %u AND partyflag & %d",
charid, PChar->PParty->m_PAlliance->m_AllianceID, PARTY_LEADER | PARTY_SECOND | PARTY_THIRD);
if (ret != SQL_ERROR && _sql->NumRows() == 1 && _sql->NextRow() == SQL_SUCCESS)
{
uint32 partyid = _sql->GetUIntData(0);
Expand Down
2 changes: 1 addition & 1 deletion src/map/party.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ void CParty::SetLeader(const std::string& MemberName)
{
uint32 newId = 0;
int ret = _sql->Query(
"SELECT chars.charid from accounts_sessions JOIN chars ON chars.charid = accounts_sessions.charid WHERE charname = ('%s')", MemberName);
"SELECT chars.charid from accounts_sessions JOIN chars ON chars.charid = accounts_sessions.charid WHERE charname = ('%s')", MemberName);

if (ret != SQL_ERROR && _sql->NumRows() != 0 && _sql->NextRow() == SQL_SUCCESS)
{
Expand Down

0 comments on commit a2b4b62

Please sign in to comment.