[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
+13 -13
View File
@@ -194,12 +194,12 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
int16 act_power = 0; // The actual pet power we'll use.
if (petpower == -1) {
if (this->IsClient()) {
if (IsClient()) {
act_power = CastToClient()->GetFocusEffect(focusPetPower, spell_id);//Client only
act_power = CastToClient()->mod_pet_power(act_power, spell_id);
}
#ifdef BOTS
else if (this->IsBot())
else if (IsBot())
act_power = CastToBot()->GetBotFocusEffect(focusPetPower, spell_id);
#endif
}
@@ -231,9 +231,9 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
memcpy(npc_type, base, sizeof(NPCType));
// If pet power is set to -1 in the DB, use stat scaling
if ((this->IsClient()
if ((IsClient()
#ifdef BOTS
|| this->IsBot()
|| IsBot()
#endif
) && record.petpower == -1)
{
@@ -276,15 +276,15 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
EntityList::RemoveNumbers(npc_type->name);
entity_list.MakeNameUnique(npc_type->name);
} else if (record.petnaming == 0) {
strcpy(npc_type->name, this->GetCleanName());
strcpy(npc_type->name, GetCleanName());
npc_type->name[25] = '\0';
strcat(npc_type->name, "`s_pet");
} else if (record.petnaming == 1) {
strcpy(npc_type->name, this->GetName());
strcpy(npc_type->name, GetName());
npc_type->name[19] = '\0';
strcat(npc_type->name, "`s_familiar");
} else if (record.petnaming == 2) {
strcpy(npc_type->name, this->GetName());
strcpy(npc_type->name, GetName());
npc_type->name[21] = 0;
strcat(npc_type->name, "`s_Warder");
} else if (record.petnaming == 4) {
@@ -292,11 +292,11 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
} else if (record.petnaming == 3 && IsClient()) {
GetRandPetName(npc_type->name);
} else if (record.petnaming == 5 && IsClient()) {
strcpy(npc_type->name, this->GetName());
strcpy(npc_type->name, GetName());
npc_type->name[24] = '\0';
strcat(npc_type->name, "`s_ward");
} else {
strcpy(npc_type->name, this->GetCleanName());
strcpy(npc_type->name, GetCleanName());
npc_type->name[25] = '\0';
strcat(npc_type->name, "`s_pet");
}
@@ -404,7 +404,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower,
activiate_pet = true;
}
}
if (activiate_pet){
npc->AddToHateList(m_target, 1);
npc->SetPetTargetLockID(m_target->GetID());
@@ -465,7 +465,7 @@ Pet::Pet(NPCType *type_data, Mob *owner, PetType type, uint16 spell_id, int16 po
// Familiar and animation pets don't get taunt until an AA.
if (owner && owner->IsClient()) {
if (!(owner->CastToClient()->ClientVersionBit() & EQ::versions::maskUFAndLater)) {
if ((typeofpet != petFamiliar && typeofpet != petAnimation) ||
if ((typeofpet != petFamiliar && typeofpet != petAnimation) ||
aabonuses.PetCommands[PET_TAUNT]) {
taunting=true;
}
@@ -541,7 +541,7 @@ void Mob::SetPet(Mob* newpet) {
Mob* oldowner = entity_list.GetMob(newpet->GetOwnerID());
if (oldowner)
oldowner->SetPetID(0);
newpet->SetOwnerID(this->GetID());
newpet->SetOwnerID(GetID());
}
}
@@ -743,7 +743,7 @@ bool Pet::CheckSpellLevelRestriction(uint16 spell_id)
return true;
}
BeastlordPetData::PetStruct ZoneDatabase::GetBeastlordPetData(uint16 race_id) {
BeastlordPetData::PetStruct ZoneDatabase::GetBeastlordPetData(uint16 race_id) {
BeastlordPetData::PetStruct beastlord_pet_data;
std::string query = fmt::format(
SQL(