- Хроники
- Chaotic Throne: High Five
- Исходники
- Присутствуют
- Сборка
- Open Team
Добрый вечер. Подскажите пожалуйста, какой командой можно сбросить откат всех инст на сборке HighFive Open team. reset_reuse_all не работает.
Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
На других сборка, тех же фёрст тим эта команда работала. //reset_reuse_all и по таргету откатывало все инсты.заходишь в бд чистишь таблицу отката инстансов, сомнительно что через админку мона сбросить
listOfInstances
) или игроков, которые находятся в инсте ( listOfCharsForInstance
). Нет никакого просмотра отката инстов на персонаже (как тут -> Откат инст ) или возможности сбросить.Есть разве что "admin_reset_skill_cool", которая откатит КД всех скиллов.На других сборка... //reset_reuse_all и по таргету откатывало все инсты.
Index: data/scripts/commands/admin/AdminInstance.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/data/scripts/commands/admin/AdminInstance.java b/data/scripts/commands/admin/AdminInstance.java
--- a/data/scripts/commands/admin/AdminInstance.java
+++ b/data/scripts/commands/admin/AdminInstance.java (date 1715339112448)
@@ -3,6 +3,7 @@
import l2open.extensions.scripts.ScriptFile;
import l2open.gameserver.handler.AdminCommandHandler;
import l2open.gameserver.handler.IAdminCommandHandler;
+import l2open.gameserver.instancemanager.InstancedZoneManager;
import l2open.gameserver.model.L2ObjectsStorage;
import l2open.gameserver.model.L2Player;
import l2open.gameserver.model.Reflection;
@@ -14,7 +15,8 @@
private static enum Commands
{
admin_instance,
- admin_instance_id
+ admin_instance_id,
+ admin_instances_reset
}
public boolean useAdminCommand(Enum comm, String[] wordList, String fullString, L2Player activeChar)
@@ -33,6 +35,11 @@
if(wordList.length > 1)
listOfCharsForInstance(activeChar, wordList[1]);
break;
+ case admin_instances_reset:
+ {
+ L2Player player = activeChar.getPlayer().getTarget() == null || !activeChar.getPlayer().getTarget().isPlayer() ? activeChar : activeChar.getPlayer().getTarget().getPlayer();
+ resetInstancesForTarget(player);
+ }
}
return true;
@@ -99,6 +106,18 @@
activeChar.sendPacket(adminReply);
}
+ private void resetInstancesForTarget(L2Player target)
+ {
+ if (target == null)
+ {
+ return;
+ }
+ for (String instanceName : InstancedZoneManager.getInstance().getNames())
+ {
+ target.unsetVar(instanceName);
+ }
+ }
+
public void onLoad()
{
AdminCommandHandler.getInstance().registerAdminCommandHandler(this);
package commands.admin;
import l2open.extensions.scripts.ScriptFile;
import l2open.gameserver.handler.AdminCommandHandler;
import l2open.gameserver.handler.IAdminCommandHandler;
import l2open.gameserver.instancemanager.InstancedZoneManager;
import l2open.gameserver.model.L2ObjectsStorage;
import l2open.gameserver.model.L2Player;
import l2open.gameserver.model.Reflection;
import l2open.gameserver.serverpackets.NpcHtmlMessage;
import l2open.gameserver.tables.ReflectionTable;
public class AdminInstance implements IAdminCommandHandler, ScriptFile
{
private static enum Commands
{
admin_instance,
admin_instance_id,
admin_instances_reset
}
public boolean useAdminCommand(Enum comm, String[] wordList, String fullString, L2Player activeChar)
{
Commands command = (Commands) comm;
if(!activeChar.getPlayerAccess().CanTeleport)
return false;
switch(command)
{
case admin_instance:
listOfInstances(activeChar);
break;
case admin_instance_id:
if(wordList.length > 1)
listOfCharsForInstance(activeChar, wordList[1]);
break;
case admin_instances_reset:
{
L2Player player = activeChar.getPlayer().getTarget() == null || !activeChar.getPlayer().getTarget().isPlayer() ? activeChar : activeChar.getPlayer().getTarget().getPlayer();
resetInstancesForTarget(player);
}
}
return true;
}
public Enum[] getAdminCommandEnum()
{
return Commands.values();
}
private void listOfInstances(L2Player activeChar)
{
NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
StringBuffer replyMSG = new StringBuffer("<html><title>Instance Menu</title><body>");
replyMSG.append("<table width=260><tr>");
replyMSG.append("<td width=40><button value=\"Main\" action=\"bypass -h admin_admin\" width=40 height=20 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
replyMSG.append("<td width=180><center>List of Instances</center></td>");
replyMSG.append("<td width=40><button value=\"Back\" action=\"bypass -h admin_admin\" width=40 height=20 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
replyMSG.append("</tr></table><br><br>");
for(Reflection reflection : L2ObjectsStorage.getAllReflections())
{
if(reflection == null || reflection.getId() <= 0 || reflection.isCollapseStarted() || reflection.getPlayerCount() < 1)
continue;
int countPlayers = 0;
if(reflection.getPlayers() != null)
countPlayers = reflection.getPlayers().size();
replyMSG.append("<a action=\"bypass -h admin_instance_id ").append(reflection.getId()).append(" \">").append(reflection.getName()).append("(").append(countPlayers).append(" players)</a><br>");
}
replyMSG.append("<button value=\"Refresh\" action=\"bypass -h admin_instance\" width=50 height=20 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\">");
replyMSG.append("</body></html>");
adminReply.setHtml(replyMSG.toString());
activeChar.sendPacket(adminReply);
}
private void listOfCharsForInstance(L2Player activeChar, String sid)
{
Reflection reflection = ReflectionTable.getInstance().get(Long.parseLong(sid));
NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
StringBuffer replyMSG = new StringBuffer("<html><title>Instance Menu</title><body><br>");
if(reflection != null)
{
replyMSG.append("<table width=260><tr>");
replyMSG.append("<td width=40><button value=\"Main\" action=\"bypass -h admin_admin\" width=40 height=20 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
replyMSG.append("<td width=180><center>List of players in ").append(reflection.getName()).append("</center></td>");
replyMSG.append("<td width=40><button value=\"Back\" action=\"bypass -h admin_instance\" width=40 height=20 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_CT1.Button_DF\"></td>");
replyMSG.append("</tr></table><br><br>");
for(L2Player player : reflection.getPlayers())
replyMSG.append("<a action=\"bypass -h admin_teleportto ").append(player.getName()).append(" \">").append(player.getName()).append("</a><br>");
}
else
{
replyMSG.append("Instance not active.<br>");
replyMSG.append("<a action=\"bypass -h admin_instance\">Back to list.</a><br>");
}
replyMSG.append("</body></html>");
adminReply.setHtml(replyMSG.toString());
activeChar.sendPacket(adminReply);
}
private void resetInstancesForTarget(L2Player target)
{
if (target == null)
{
return;
}
for (String instanceName : InstancedZoneManager.getInstance().getNames())
{
target.unsetVar(instanceName);
}
}
public void onLoad()
{
AdminCommandHandler.getInstance().registerAdminCommandHandler(this);
}
public void onReload()
{}
public void onShutdown()
{}
}