Addition of INSTANCE_ORIGIN at PlayerVariables.
This commit is contained in:
parent
358337b2b7
commit
78c0316f4f
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
@ -67,6 +67,7 @@ import org.l2jmobius.gameserver.model.interfaces.ILocational;
|
||||
import org.l2jmobius.gameserver.model.interfaces.INamable;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnGroup;
|
||||
import org.l2jmobius.gameserver.model.spawns.SpawnTemplate;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
@ -1024,7 +1025,7 @@ public class Instance implements IIdentifiable, INamable
|
||||
// Set origin return location if enabled
|
||||
if (_template.getExitLocationType() == InstanceTeleportType.ORIGIN)
|
||||
{
|
||||
player.getVariables().set("INSTANCE_ORIGIN", player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
player.getVariables().set(PlayerVariables.INSTANCE_ORIGIN, player.getX() + ";" + player.getY() + ";" + player.getZ());
|
||||
}
|
||||
|
||||
// Remove player buffs
|
||||
|
@ -383,11 +383,14 @@ public class InstanceTemplate extends ListenersContainer implements IIdentifiabl
|
||||
case ORIGIN:
|
||||
{
|
||||
final PlayerVariables vars = player.getVariables();
|
||||
final int[] loc = vars.getIntArray("INSTANCE_ORIGIN", ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
if (vars.contains(PlayerVariables.INSTANCE_ORIGIN))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
vars.remove("INSTANCE_ORIGIN");
|
||||
final int[] loc = vars.getIntArray(PlayerVariables.INSTANCE_ORIGIN, ";");
|
||||
if ((loc != null) && (loc.length == 3))
|
||||
{
|
||||
location = new Location(loc[0], loc[1], loc[2]);
|
||||
}
|
||||
vars.remove(PlayerVariables.INSTANCE_ORIGIN);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ public class PlayerVariables extends AbstractVariables
|
||||
private static final String INSERT_QUERY = "INSERT INTO character_variables (charId, var, val) VALUES (?, ?, ?)";
|
||||
|
||||
// Public variable names
|
||||
public static final String INSTANCE_ORIGIN = "INSTANCE_ORIGIN";
|
||||
public static final String HAIR_ACCESSORY_VARIABLE_NAME = "HAIR_ACCESSORY_ENABLED";
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_USED";
|
||||
public static final String VITALITY_ITEMS_USED_VARIABLE_NAME = "VITALITY_ITEMS_USED";
|
||||
|
Loading…
Reference in New Issue
Block a user