EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   Teleport doors bug (https://www.eqemulator.org/forums/showthread.php?t=10385)

Scorpious2k 11-20-2003 01:27 PM

Teleport doors bug
 
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.

Trumpcard 11-20-2003 02:38 PM

Thanks Scorp, i'll try to get this merged in for you this week..

Scorpious2k 11-20-2003 11:35 PM

Thanks. Tar2k3 is working hard doing frozenshadow by himself and it is looking really good.

He does have an odd problem tho, and maybe someone with some door expirience can help. It seems that the teleport doors that are used to zone to new zones (into frozenshadow and to iceclad) end up going to the specified zone but using a 0 0 0 location,

He's tried inverting the X Y coords both ways, and is using location numbers he collected and confirmed by actually going into the game and standing at the place and gathering the X Y Z.

Other teleport doors work exactly as expected (as in poknowledge) so I don't think its a program bug... just something he is missing (and me as well since I have looked at the db entries too).

Anyone ever encountered this before? Any genius with a fix?

Trumpcard 11-21-2003 11:12 AM

Not sure about your problem, but your change is in..

Thanks!

kai_shadowbane 11-21-2003 11:15 AM

Might be simple and stupid, but did you check that the x and y were reversed when you made the changes? (since new patch)

it might have zoned in at an illegal point and went to the default "safe" at 0,0,0


All times are GMT -4. The time now is 07:13 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.