[Code Cleanup] Remove this-> in code where its implied (#2088)

This commit is contained in:
Chris Miles
2022-05-01 09:22:09 -05:00
committed by GitHub
parent b02008ec53
commit 5b4aeaa457
47 changed files with 1033 additions and 1033 deletions
+11 -11
View File
@@ -97,10 +97,10 @@ void NPC::DisplayWaypointInfo(Client *client) {
GetID(),
GetSpawnGroupId(),
GetSpawnPointID()
).c_str()
).c_str()
);
for (const auto& current_waypoint : Waypoints) {
client->Message(
Chat::White,
@@ -118,7 +118,7 @@ void NPC::DisplayWaypointInfo(Client *client) {
"{} ({})",
ConvertSecondsToTime(current_waypoint.pause),
current_waypoint.pause
) :
) :
""
)
).c_str()
@@ -237,7 +237,7 @@ void NPC::MoveTo(const glm::vec4 &position, bool saveguardspot)
} //hack to make IsGuarding simpler
if (m_GuardPoint.w == -1)
m_GuardPoint.w = this->CalculateHeadingToTarget(position.x, position.y);
m_GuardPoint.w = CalculateHeadingToTarget(position.x, position.y);
LogAI("Setting guard position to [{}]", to_string(static_cast<glm::vec3>(m_GuardPoint)).c_str());
}
@@ -632,7 +632,7 @@ void NPC::AssignWaypoints(int32 grid_id, int start_wp)
if (grid_id < 0) {
// Allow setting negative grid values for pausing pathing
this->CastToNPC()->SetGrid(grid_id);
CastToNPC()->SetGrid(grid_id);
return;
}
@@ -767,9 +767,9 @@ float Mob::GetFixedZ(const glm::vec3 &destination, int32 z_find_offset) {
/*
* Any more than 5 in the offset makes NPC's hop/snap to ceiling in small corridors
*/
new_z = this->FindDestGroundZ(destination, z_find_offset);
new_z = FindDestGroundZ(destination, z_find_offset);
if (new_z != BEST_Z_INVALID) {
new_z += this->GetZOffset();
new_z += GetZOffset();
if (new_z < -2000) {
new_z = m_Position.z;
@@ -779,7 +779,7 @@ float Mob::GetFixedZ(const glm::vec3 &destination, int32 z_find_offset) {
auto duration = timer.elapsed();
LogFixZ("Mob::GetFixedZ() ([{}]) returned [{}] at [{}], [{}], [{}] - Took [{}]",
this->GetCleanName(),
GetCleanName(),
new_z,
destination.x,
destination.y,
@@ -811,17 +811,17 @@ void Mob::FixZ(int32 z_find_offset /*= 5*/, bool fix_client_z /*= false*/) {
if ((new_z > -2000) && new_z != BEST_Z_INVALID) {
if (RuleB(Map, MobZVisualDebug)) {
this->SendAppearanceEffect(78, 0, 0, 0, 0);
SendAppearanceEffect(78, 0, 0, 0, 0);
}
m_Position.z = new_z;
}
else {
if (RuleB(Map, MobZVisualDebug)) {
this->SendAppearanceEffect(103, 0, 0, 0, 0);
SendAppearanceEffect(103, 0, 0, 0, 0);
}
LogFixZ("[{}] is failing to find Z [{}]", this->GetCleanName(), std::abs(m_Position.z - new_z));
LogFixZ("[{}] is failing to find Z [{}]", GetCleanName(), std::abs(m_Position.z - new_z));
}
}