[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
+44 -44
View File
@@ -85,25 +85,25 @@ Doors::Doors(const char *model, const glm::vec4 &position, uint8 open_type, uint
strn0cpy(door_name, model, 32);
strn0cpy(destination_zone_name, "NONE", 32);
this->database_id = (uint32) content_db.GetDoorsCountPlusOne(zone->GetShortName(), zone->GetInstanceVersion());
this->door_id = (uint8) content_db.GetDoorsDBCountPlusOne(zone->GetShortName(), zone->GetInstanceVersion());
database_id = (uint32) content_db.GetDoorsCountPlusOne(zone->GetShortName(), zone->GetInstanceVersion());
door_id = (uint8) content_db.GetDoorsDBCountPlusOne(zone->GetShortName(), zone->GetInstanceVersion());
this->open_type = open_type;
this->size = size;
this->incline = 0;
this->guild_id = 0;
this->lockpick = 0;
this->key_item_id = 0;
this->no_key_ring = 0;
this->trigger_door = 0;
this->trigger_type = 0;
this->triggered = false;
this->door_param = 0;
this->invert_state = 0;
this->is_ldon_door = 0;
this->client_version_mask = 4294967295u;
this->disable_timer = 0;
this->destination_instance_id = 0;
open_type = open_type;
size = size;
incline = 0;
guild_id = 0;
lockpick = 0;
key_item_id = 0;
no_key_ring = 0;
trigger_door = 0;
trigger_type = 0;
triggered = false;
door_param = 0;
invert_state = 0;
is_ldon_door = 0;
client_version_mask = 4294967295u;
disable_timer = 0;
destination_instance_id = 0;
SetOpenState(false);
close_timer.Disable();
@@ -137,30 +137,30 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
Log(Logs::Detail, Logs::Doors,
"%s clicked door %s (dbid %d, eqid %d) at %s",
sender->GetName(),
this->door_name,
this->database_id,
this->door_id,
door_name,
database_id,
door_id,
to_string(m_Position).c_str()
);
Log(Logs::Detail, Logs::Doors,
"incline %d, open_type %d, lockpick %d, key %d, nokeyring %d, trigger %d type %d, param %d",
this->incline,
this->open_type,
this->lockpick,
this->key_item_id,
this->no_key_ring,
this->trigger_door,
this->trigger_type,
this->door_param
incline,
open_type,
lockpick,
key_item_id,
no_key_ring,
trigger_door,
trigger_type,
door_param
);
Log(Logs::Detail, Logs::Doors,
"disable_timer '%s',size %d, invert %d, dest: %s %s",
(this->disable_timer ? "true" : "false"),
this->size,
this->invert_state,
this->destination_zone_name,
(disable_timer ? "true" : "false"),
size,
invert_state,
destination_zone_name,
to_string(m_Destination).c_str()
);
@@ -168,7 +168,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
auto *move_door_packet = (MoveDoor_Struct *) outapp->pBuffer;
move_door_packet->doorid = door_id;
if (this->IsLDoNDoor()) {
if (IsLDoNDoor()) {
if (sender) {
if (RuleI(Adventure, ItemIDToEnablePorts) != 0) {
if (!sender->KeyRingCheck(RuleI(Adventure, ItemIDToEnablePorts))) {
@@ -197,7 +197,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
strcpy(adventure_door_click->player, sender->GetName());
adventure_door_click->zone_id = zone->GetZoneID();
adventure_door_click->id = this->GetDoorDBID();
adventure_door_click->id = GetDoorDBID();
worldserver.SendPacket(pack);
safe_delete(pack);
@@ -234,13 +234,13 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
/**
* Object is not triggered
*/
if (this->GetTriggerType() == 255) {
if (GetTriggerType() == 255) {
/**
* Door is only triggered by an object
*/
if (trigger == 1) {
if (!this->IsDoorOpen() || (open_type == 58)) {
if (!IsDoorOpen() || (open_type == 58)) {
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR);
} else {
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR);
@@ -256,12 +256,12 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
*
* Door is not locked
*/
bool is_guild_door = (this->GetGuildID() > 0) && (this->GetGuildID() == sender->GuildID());
bool is_door_not_locked = ((required_key_item == 0) && (this->GetLockpick() == 0) && (this->GetGuildID() == 0));
bool is_door_open_and_open_able = (this->IsDoorOpen() && (open_type == 58));
bool is_guild_door = (GetGuildID() > 0) && (GetGuildID() == sender->GuildID());
bool is_door_not_locked = ((required_key_item == 0) && (GetLockpick() == 0) && (GetGuildID() == 0));
bool is_door_open_and_open_able = (IsDoorOpen() && (open_type == 58));
if (is_door_not_locked || is_door_open_and_open_able || is_guild_door) {
if (!this->IsDoorOpen() || (this->GetOpenType() == 58)) {
if (!IsDoorOpen() || (GetOpenType() == 58)) {
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR);
} else {
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR);
@@ -271,7 +271,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
/**
* Guild Doors
*/
if ((this->GetGuildID() > 0) && !sender->GetGM()) {
if ((GetGuildID() > 0) && !sender->GetGM()) {
std::string guild_name;
char door_message[240];
@@ -407,7 +407,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
if (!IsDoorOpen() || (open_type == 58)) {
if (!disable_timer)
close_timer.Start();
if(strncmp(destination_zone_name, "NONE", strlen("NONE")) == 0)
SetOpenState(true);
} else {
@@ -515,7 +515,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
} else {
sender->MovePC(
ZoneID(destination_zone_name),
static_cast<uint32>(this->destination_instance_id),
static_cast<uint32>(destination_instance_id),
m_Destination.x,
m_Destination.y,
m_Destination.z,