[Cleanup] Wake The Dead argument was named the same as a member variable in Mob (#3214)

# Notes
- Member variable is also named `target`.
This commit is contained in:
Alex King 2023-04-03 17:23:48 -04:00 committed by GitHub
parent 3e5d0a0601
commit b1571cd062
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -285,7 +285,7 @@ void Mob::TypesTemporaryPets(uint32 typesid, Mob *targ, const char *name_overrid
delete made_npc;
}
void Mob::WakeTheDead(uint16 spell_id, Corpse *corpse_to_use, Mob *target, uint32 duration) {
void Mob::WakeTheDead(uint16 spell_id, Corpse *corpse_to_use, Mob *tar, uint32 duration) {
/*
SPA 299 Wake The Dead, 'animateDead' should be temp pet, always spawns 1 pet from corpse, max value is duration
@ -489,8 +489,8 @@ void Mob::WakeTheDead(uint16 spell_id, Corpse *corpse_to_use, Mob *target, uint3
swarm_pet_npc->GetSwarmInfo()->owner_id = GetID();
//give the pets somebody to "love"
if (target != nullptr) {
swarm_pet_npc->AddToHateList(target, 10000, 1000);
if (tar != nullptr) {
swarm_pet_npc->AddToHateList(tar, 10000, 1000);
swarm_pet_npc->GetSwarmInfo()->target = 0;
}
@ -503,8 +503,8 @@ void Mob::WakeTheDead(uint16 spell_id, Corpse *corpse_to_use, Mob *target, uint3
}
//the target of these swarm pets will take offense to being cast on...
if (target != nullptr)
target->AddToHateList(this, 1, 0);
if (tar != nullptr)
tar->AddToHateList(this, 1, 0);
// The other pointers we make are handled elsewhere.
delete made_npc;