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