Here's a new one for those who are bored
Doors work great in most cases. But we're if you have a teleport door that requires a key item, you have a problem. The person who uses the key will be teleported correctly, but if he is in a group the rest will be told they don't have the key or that the lock can't be picked....
So here is the fix (and yes its 5.0 and 4.4):
In
doors.cpp Doors::HandleClick
change...
Code:
if((GetKeyItem()==0 && GetLockpick()==0) || (GetKeyItem() == sender->GetItemAt(0))) {
//door not locked, or door is locked & client is using key
if(!IsDoorOpen()) {
to
Code:
if((GetKeyItem()==0 && GetLockpick()==0)
|| (GetKeyItem() == sender->GetItemAt(0))
|| (IsDoorOpen() && opentype == 58))
{
//door not locked, or door is locked & client is using key or door is open
if(!IsDoorOpen() || opentype == 58)
and near the end of the function
Code:
if(!isopen) {
close_timer->Start();
isopen=true;
}
else {
close_timer->Disable();
isopen=false;
}
should be
Code:
if(!isopen || opentype == 58)
{
close_timer->Start();
isopen=true;
}
else {
close_timer->Disable();
isopen=false;
}
This allows characters to follow the one with the key. What it should do is leave the teleport door "open" for 10 seconds to allow the next person to teleport.... this will reset the timer and allow another 10 seconds for the next... then 10 more... etc etc until the entire group has gone. Then it will be locked again and require the key.