Better comments and naming for DoorInstance isOpen method.

This commit is contained in:
MobiusDevelopment
2019-08-23 08:27:45 +00:00
parent 895f3b56c7
commit 2bd3168bb2
21 changed files with 37 additions and 39 deletions

View File

@ -197,7 +197,7 @@ public class DoorInstance extends Creature
}
/**
* @return Returns the open.
* @return Returns if the door is open.
*/
public boolean isOpen()
{
@ -205,7 +205,7 @@ public class DoorInstance extends Creature
}
/**
* @param open The open to set.
* @param open The door open status.
*/
public void setOpen(boolean open)
{

View File

@ -197,7 +197,7 @@ public class DoorInstance extends Creature
}
/**
* @return Returns the open.
* @return Returns if the door is open.
*/
public boolean isOpen()
{
@ -205,7 +205,7 @@ public class DoorInstance extends Creature
}
/**
* @param open The open to set.
* @param open The door open status.
*/
public void setOpen(boolean open)
{

View File

@ -197,7 +197,7 @@ public class DoorInstance extends Creature
}
/**
* @return Returns the open.
* @return Returns if the door is open.
*/
public boolean isOpen()
{
@ -205,7 +205,7 @@ public class DoorInstance extends Creature
}
/**
* @param open The open to set.
* @param open The door open status.
*/
public void setOpen(boolean open)
{

View File

@ -197,7 +197,7 @@ public class DoorInstance extends Creature
}
/**
* @return Returns the open.
* @return Returns if the door is open.
*/
public boolean isOpen()
{
@ -205,7 +205,7 @@ public class DoorInstance extends Creature
}
/**
* @param open The open to set.
* @param open The door open status.
*/
public void setOpen(boolean open)
{

View File

@ -197,7 +197,7 @@ public class DoorInstance extends Creature
}
/**
* @return Returns the open.
* @return Returns if the door is open.
*/
public boolean isOpen()
{
@ -205,7 +205,7 @@ public class DoorInstance extends Creature
}
/**
* @param open The open to set.
* @param open The door open status.
*/
public void setOpen(boolean open)
{

View File

@ -197,7 +197,7 @@ public class DoorInstance extends Creature
}
/**
* @return Returns the open.
* @return Returns if the door is open.
*/
public boolean isOpen()
{
@ -205,7 +205,7 @@ public class DoorInstance extends Creature
}
/**
* @param open The open to set.
* @param open The door open status.
*/
public void setOpen(boolean open)
{

View File

@ -197,7 +197,7 @@ public class DoorInstance extends Creature
}
/**
* @return Returns the open.
* @return Returns if the door is open.
*/
public boolean isOpen()
{
@ -205,7 +205,7 @@ public class DoorInstance extends Creature
}
/**
* @param open The open to set.
* @param open The door open status.
*/
public void setOpen(boolean open)
{

View File

@ -368,7 +368,7 @@ public class DoorTable
// phase 3, basically only z remains but now we calculate it with another formula (by rage)
// in some cases the direct line check (only) in the beginning isn't sufficient,
// when char z changes a lot along the path
if ((doorInst.getStatus().getCurrentHp() > 0) && !doorInst.getOpen())
if ((doorInst.getStatus().getCurrentHp() > 0) && !doorInst.isOpen())
{
final int px1 = doorInst.getXMin();
final int py1 = doorInst.getYMin();

View File

@ -63,7 +63,7 @@ public class Unlock implements ISkillHandler
return;
}
if (success && (!door.getOpen()))
if (success && (!door.isOpen()))
{
door.openMe();
door.onOpen();

View File

@ -262,17 +262,15 @@ public class DoorInstance extends Creature
}
/**
* Gets the open.
* @return Returns the open.
* @return Returns if the door is open.
*/
public boolean getOpen()
public boolean isOpen()
{
return _open;
}
/**
* Sets the open.
* @param open The open to set.
* @param open The door open status.
*/
public void setOpen(boolean open)
{

View File

@ -535,7 +535,7 @@ public class ClanHall
door.spawnMe(door.getX(), door.getY(), door.getZ());
getDoors().set(i, door);
}
else if (door.getOpen())
else if (door.isOpen())
{
door.closeMe();
}

View File

@ -468,7 +468,7 @@ public class Castle
door.spawnMe(door.getX(), door.getY(), door.getZ());
_doors.set(i, door);
}
else if (door.getOpen())
else if (door.isOpen())
{
door.closeMe();
}

View File

@ -301,7 +301,7 @@ public class Fort
door.spawnMe(door.getX(), door.getY(), door.getZ());
_doors.set(i, door);
}
else if (!door.getOpen())
else if (!door.isOpen())
{
door.closeMe();
}

View File

@ -36,7 +36,7 @@ public class DoorStatusUpdate extends GameServerPacket
{
writeC(0x4d);
writeD(_door.getObjectId());
writeD(_door.getOpen() ? 0 : 1);
writeD(_door.isOpen() ? 0 : 1);
writeD(_door.getDamage());
writeD(_door.isEnemyOf(getClient().getPlayer()) ? 1 : 0);
writeD(_door.getDoorId());

View File

@ -214,7 +214,7 @@ public class DoorInstance extends Creature
}
/**
* @return Returns the open.
* @return Returns if the door is open.
*/
public boolean isOpen()
{
@ -222,7 +222,7 @@ public class DoorInstance extends Creature
}
/**
* @param open The open to set.
* @param open The door open status.
*/
public void setOpen(boolean open)
{

View File

@ -197,7 +197,7 @@ public class DoorInstance extends Creature
}
/**
* @return Returns the open.
* @return Returns if the door is open.
*/
public boolean isOpen()
{
@ -205,7 +205,7 @@ public class DoorInstance extends Creature
}
/**
* @param open The open to set.
* @param open The door open status.
*/
public void setOpen(boolean open)
{

View File

@ -197,7 +197,7 @@ public class DoorInstance extends Creature
}
/**
* @return Returns the open.
* @return Returns if the door is open.
*/
public boolean isOpen()
{
@ -205,7 +205,7 @@ public class DoorInstance extends Creature
}
/**
* @param open The open to set.
* @param open The door open status.
*/
public void setOpen(boolean open)
{

View File

@ -197,7 +197,7 @@ public class DoorInstance extends Creature
}
/**
* @return Returns the open.
* @return Returns if the door is open.
*/
public boolean isOpen()
{
@ -205,7 +205,7 @@ public class DoorInstance extends Creature
}
/**
* @param open The open to set.
* @param open The door open status.
*/
public void setOpen(boolean open)
{

View File

@ -197,7 +197,7 @@ public class DoorInstance extends Creature
}
/**
* @return Returns the open.
* @return Returns if the door is open.
*/
public boolean isOpen()
{
@ -205,7 +205,7 @@ public class DoorInstance extends Creature
}
/**
* @param open The open to set.
* @param open The door open status.
*/
public void setOpen(boolean open)
{

View File

@ -197,7 +197,7 @@ public class DoorInstance extends Creature
}
/**
* @return Returns the open.
* @return Returns if the door is open.
*/
public boolean isOpen()
{
@ -205,7 +205,7 @@ public class DoorInstance extends Creature
}
/**
* @param open The open to set.
* @param open The door open status.
*/
public void setOpen(boolean open)
{

View File

@ -197,7 +197,7 @@ public class DoorInstance extends Creature
}
/**
* @return Returns the open.
* @return Returns if the door is open.
*/
public boolean isOpen()
{
@ -205,7 +205,7 @@ public class DoorInstance extends Creature
}
/**
* @param open The open to set.
* @param open The door open status.
*/
public void setOpen(boolean open)
{