haecz
04-11-2008, 06:38 AM
/Corpse on contented corpses do not have a Distance check.
Change:
if(strcmp(this->GetOwnerName(), itr->c_str()) == 0) {
GMMove(client->GetX(), client->GetY(), client->GetZ());
pIsChanged = true;
consented = true;
}
}
if(!consented)
client->Message(0, "You do not have permission to move this corpse.");
}
To:
if(strcmp(this->GetOwnerName(), itr->c_str()) == 0) {
if (DistNoRootNoZ(*client) <= dist2) {
GMMove(client->GetX(), client->GetY(), client->GetZ());
pIsChanged = true;
}
else {
client->Message(0, "Corpse is too far away.");
}
consented = true;
}
}
if(!consented)
client->Message(0, "You do not have permission to move this corpse.");
}
}
PS. Yes putting the distance check with the consent check (&&) does make more sense, feel free to edit that ;)
Change:
if(strcmp(this->GetOwnerName(), itr->c_str()) == 0) {
GMMove(client->GetX(), client->GetY(), client->GetZ());
pIsChanged = true;
consented = true;
}
}
if(!consented)
client->Message(0, "You do not have permission to move this corpse.");
}
To:
if(strcmp(this->GetOwnerName(), itr->c_str()) == 0) {
if (DistNoRootNoZ(*client) <= dist2) {
GMMove(client->GetX(), client->GetY(), client->GetZ());
pIsChanged = true;
}
else {
client->Message(0, "Corpse is too far away.");
}
consented = true;
}
}
if(!consented)
client->Message(0, "You do not have permission to move this corpse.");
}
}
PS. Yes putting the distance check with the consent check (&&) does make more sense, feel free to edit that ;)