L2Object rework.
This commit is contained in:
@@ -158,10 +158,6 @@
|
||||
<admin command="admin_para_all_menu" accessLevel="100" />
|
||||
<admin command="admin_unpara_menu" accessLevel="100" />
|
||||
<admin command="admin_para_menu" accessLevel="100" />
|
||||
<admin command="admin_polyself" accessLevel="100" />
|
||||
<admin command="admin_unpolyself" accessLevel="100" />
|
||||
<admin command="admin_polyself_menu" accessLevel="100" />
|
||||
<admin command="admin_unpolyself_menu" accessLevel="100" />
|
||||
<admin command="admin_clearteams" accessLevel="100" />
|
||||
<admin command="admin_setteam_close" accessLevel="100" />
|
||||
<admin command="admin_setteam" accessLevel="100" />
|
||||
@@ -232,8 +228,6 @@
|
||||
<admin command="admin_event_name" accessLevel="100" />
|
||||
<admin command="admin_event_control_kill" accessLevel="100" />
|
||||
<admin command="admin_event_control_res" accessLevel="100" />
|
||||
<admin command="admin_event_control_poly" accessLevel="100" />
|
||||
<admin command="admin_event_control_unpoly" accessLevel="100" />
|
||||
<admin command="admin_event_control_transform" accessLevel="100" />
|
||||
<admin command="admin_event_control_untransform" accessLevel="100" />
|
||||
<admin command="admin_event_control_prize" accessLevel="100" />
|
||||
@@ -424,9 +418,7 @@
|
||||
<!-- ADMIN PLEDGE -->
|
||||
<admin command="admin_pledge" accessLevel="100" />
|
||||
|
||||
<!-- ADMIN POLYMORPH -->
|
||||
<admin command="admin_polymorph" accessLevel="100" />
|
||||
<admin command="admin_unpolymorph" accessLevel="100" />
|
||||
<!-- ADMIN TRANSFORM -->
|
||||
<admin command="admin_transform" accessLevel="100" />
|
||||
<admin command="admin_untransform" accessLevel="100" />
|
||||
<admin command="admin_transform_menu" accessLevel="100" />
|
||||
|
@@ -16,12 +16,6 @@
|
||||
Character Based:<br1>
|
||||
<table width=270>
|
||||
<tr>
|
||||
<td><button value="PolyMorph" action="bypass -h admin_polymorph_menu $qbox" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td><button value="Un Poly" action="bypass -h admin_unpolymorph_menu" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td><button value="Poly Self" action="bypass -h admin_polyself_menu $qbox" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td><button value="UnPolySlf" action="bypass -h admin_unpolyself_menu" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><button value="Para" action="bypass -h admin_para_menu $qbox" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td><button value="Un Para" action="bypass -h admin_unpara_menu $qbox" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td><button value="Para All" action="bypass -h admin_para_all_menu" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
|
@@ -227,9 +227,7 @@ public class TarBeetleSpawn implements IGameXmlReader
|
||||
{
|
||||
final L2Spawn spawn = new L2Spawn(18804);
|
||||
spawn.setHeading(Rnd.get(65535));
|
||||
spawn.setX(location.getX());
|
||||
spawn.setY(location.getY());
|
||||
spawn.setZ(GeoEngine.getInstance().getHeight(location.getX(), location.getY(), location.getZ()));
|
||||
spawn.setXYZ(location.getX(), location.getY(), GeoEngine.getInstance().getHeight(location.getX(), location.getY(), location.getZ()));
|
||||
|
||||
final L2Npc npc = spawn.doSpawn();
|
||||
npc.setRandomWalking(false);
|
||||
|
@@ -745,9 +745,7 @@ public final class TowerOfNaia extends AbstractNpcAI
|
||||
_sporeSpawn.add(npc);
|
||||
npc.setWalking();
|
||||
final int[] coord = SPORES_MOVE_POINTS[getRandom(SPORES_MOVE_POINTS.length)];
|
||||
npc.getSpawn().setX(coord[0]);
|
||||
npc.getSpawn().setY(coord[1]);
|
||||
npc.getSpawn().setZ(coord[2]);
|
||||
npc.getSpawn().setXYZ(coord[0], coord[1], coord[2]);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(coord[0], coord[1], coord[2], 0));
|
||||
startQuestTimer("despawn_spore", 60000, npc, null);
|
||||
}
|
||||
@@ -836,9 +834,7 @@ public final class TowerOfNaia extends AbstractNpcAI
|
||||
npc.disableCoreAI(true);
|
||||
npc.setRandomWalking(false);
|
||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(coords[0], coords[1], coords[2], heading));
|
||||
npc.getSpawn().setX(coords[0]);
|
||||
npc.getSpawn().setY(coords[1]);
|
||||
npc.getSpawn().setZ(coords[2]);
|
||||
npc.getSpawn().setXYZ(coords[0], coords[1], coords[2]);
|
||||
}
|
||||
return time == 0 ? 100 : time;
|
||||
}
|
||||
|
@@ -717,9 +717,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
|
||||
try
|
||||
{
|
||||
_gourds[i] = new L2Spawn(GOURDS[i]);
|
||||
_gourds[i].setX(ARENAS[i].getX() + 150);
|
||||
_gourds[i].setY(ARENAS[i].getY() + 150);
|
||||
_gourds[i].setZ(ARENAS[i].getZ());
|
||||
_gourds[i].setXYZ(ARENAS[i].getX() + 150, ARENAS[i].getY() + 150, ARENAS[i].getZ());
|
||||
_gourds[i].setHeading(1);
|
||||
_gourds[i].setAmount(1);
|
||||
}
|
||||
|
@@ -82,7 +82,7 @@ public final class RaidbossInfo extends AbstractNpcAI
|
||||
final L2Spawn spawn = SpawnTable.getInstance().getAnySpawn(bossId);
|
||||
if (spawn != null)
|
||||
{
|
||||
final Location loc = spawn.getLocation();
|
||||
final Location loc = spawn;
|
||||
player.getRadar().addMarker(loc.getX(), loc.getY(), loc.getZ());
|
||||
}
|
||||
}
|
||||
|
@@ -106,7 +106,6 @@ import handlers.admincommandhandlers.AdminPathNode;
|
||||
import handlers.admincommandhandlers.AdminPcCondOverride;
|
||||
import handlers.admincommandhandlers.AdminPetition;
|
||||
import handlers.admincommandhandlers.AdminPledge;
|
||||
import handlers.admincommandhandlers.AdminPolymorph;
|
||||
import handlers.admincommandhandlers.AdminPremium;
|
||||
import handlers.admincommandhandlers.AdminPunishment;
|
||||
import handlers.admincommandhandlers.AdminQuest;
|
||||
@@ -129,6 +128,7 @@ import handlers.admincommandhandlers.AdminTargetSay;
|
||||
import handlers.admincommandhandlers.AdminTeleport;
|
||||
import handlers.admincommandhandlers.AdminTerritoryWar;
|
||||
import handlers.admincommandhandlers.AdminTest;
|
||||
import handlers.admincommandhandlers.AdminTransform;
|
||||
import handlers.admincommandhandlers.AdminTvTEvent;
|
||||
import handlers.admincommandhandlers.AdminUnblockIp;
|
||||
import handlers.admincommandhandlers.AdminVitality;
|
||||
@@ -406,7 +406,6 @@ public class MasterHandler
|
||||
AdminPForge.class,
|
||||
AdminPledge.class,
|
||||
AdminZones.class,
|
||||
AdminPolymorph.class,
|
||||
AdminPremium.class,
|
||||
AdminPunishment.class,
|
||||
AdminQuest.class,
|
||||
@@ -429,6 +428,7 @@ public class MasterHandler
|
||||
AdminTeleport.class,
|
||||
AdminTerritoryWar.class,
|
||||
AdminTest.class,
|
||||
AdminTransform.class,
|
||||
AdminTvTEvent.class,
|
||||
AdminUnblockIp.class,
|
||||
AdminVitality.class,
|
||||
|
@@ -120,7 +120,7 @@ public class L2NpcActionShift implements IActionShiftHandler
|
||||
if (((L2Npc) target).getSpawn().isTerritoryBased())
|
||||
{
|
||||
html.replace("%spawntype%", "Random");
|
||||
final Location spawnLoc = ((L2Npc) target).getSpawn().getLocation();
|
||||
final Location spawnLoc = ((L2Npc) target).getSpawn();
|
||||
html.replace("%spawn%", spawnLoc.getX() + " " + spawnLoc.getY() + " " + spawnLoc.getZ());
|
||||
}
|
||||
else
|
||||
|
@@ -50,7 +50,6 @@ import com.l2jmobius.gameserver.util.Util;
|
||||
* <li>gmspeed = temporary Super Haste effect.
|
||||
* <li>para/unpara = paralyze/remove paralysis from target
|
||||
* <li>para_all/unpara_all = same as para/unpara, affects the whole world.
|
||||
* <li>polyself/unpolyself = makes you look as a specified mob.
|
||||
* <li>changename = temporary change name
|
||||
* <li>clearteams/setteam_close/setteam = team related commands
|
||||
* <li>social = forces an L2Character instance to broadcast social action packets.
|
||||
@@ -81,10 +80,6 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
"admin_para_all_menu",
|
||||
"admin_unpara_menu",
|
||||
"admin_para_menu",
|
||||
"admin_polyself",
|
||||
"admin_unpolyself",
|
||||
"admin_polyself_menu",
|
||||
"admin_unpolyself_menu",
|
||||
"admin_clearteams",
|
||||
"admin_setteam_close",
|
||||
"admin_setteam",
|
||||
@@ -349,27 +344,6 @@ public class AdminEffects implements IAdminCommandHandler
|
||||
{
|
||||
}
|
||||
}
|
||||
else if (command.startsWith("admin_polyself"))
|
||||
{
|
||||
try
|
||||
{
|
||||
final String id = st.nextToken();
|
||||
activeChar.getPoly().setPolyInfo("npc", id);
|
||||
activeChar.teleToLocation(activeChar.getLocation());
|
||||
activeChar.broadcastUserInfo();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
BuilderUtil.sendSysMessage(activeChar, "Usage: //polyself <npcId>");
|
||||
}
|
||||
}
|
||||
else if (command.startsWith("admin_unpolyself"))
|
||||
{
|
||||
activeChar.getPoly().setPolyInfo(null, "1");
|
||||
activeChar.decayMe();
|
||||
activeChar.spawnMe(activeChar.getX(), activeChar.getY(), activeChar.getZ());
|
||||
activeChar.broadcastUserInfo();
|
||||
}
|
||||
else if (command.equals("admin_clearteams"))
|
||||
{
|
||||
L2World.getInstance().forEachVisibleObject(activeChar, L2PcInstance.class, player ->
|
||||
|
@@ -66,8 +66,6 @@ public class AdminEventEngine implements IAdminCommandHandler
|
||||
"admin_event_name",
|
||||
"admin_event_control_kill",
|
||||
"admin_event_control_res",
|
||||
"admin_event_control_poly",
|
||||
"admin_event_control_unpoly",
|
||||
"admin_event_control_transform",
|
||||
"admin_event_control_untransform",
|
||||
"admin_event_control_prize",
|
||||
@@ -307,38 +305,6 @@ public class AdminEventEngine implements IAdminCommandHandler
|
||||
}
|
||||
showEventControl(activeChar);
|
||||
}
|
||||
else if (actualCommand.startsWith("admin_event_control_poly"))
|
||||
{
|
||||
final int teamId = Integer.parseInt(st.nextToken());
|
||||
final String[] polyIds = new String[st.countTokens()];
|
||||
int i = 0;
|
||||
while (st.hasMoreElements()) // Every next ST should be a polymorph ID
|
||||
{
|
||||
polyIds[i++] = st.nextToken();
|
||||
}
|
||||
|
||||
for (L2PcInstance player : L2Event._teams.get(teamId))
|
||||
{
|
||||
player.getPoly().setPolyInfo("npc", polyIds[Rnd.get(polyIds.length)]);
|
||||
player.teleToLocation(player.getLocation(), true);
|
||||
player.broadcastUserInfo();
|
||||
}
|
||||
showEventControl(activeChar);
|
||||
}
|
||||
else if (actualCommand.startsWith("admin_event_control_unpoly"))
|
||||
{
|
||||
while (st.hasMoreElements()) // Every next ST should be a team number
|
||||
{
|
||||
for (L2PcInstance player : L2Event._teams.get(Integer.parseInt(st.nextToken())))
|
||||
{
|
||||
player.getPoly().setPolyInfo(null, "1");
|
||||
player.decayMe();
|
||||
player.spawnMe(player.getX(), player.getY(), player.getZ());
|
||||
player.broadcastUserInfo();
|
||||
}
|
||||
}
|
||||
showEventControl(activeChar);
|
||||
}
|
||||
else if (actualCommand.startsWith("admin_event_control_transform"))
|
||||
{
|
||||
final int teamId = Integer.parseInt(st.nextToken());
|
||||
@@ -562,7 +528,7 @@ public class AdminEventEngine implements IAdminCommandHandler
|
||||
|
||||
final NpcHtmlMessage adminReply = new NpcHtmlMessage();
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append("<html><title>[ L2J EVENT ENGINE ]</title><body><br><center>Current event: <font color=\"LEVEL\">");
|
||||
sb.append("<html><title>[ EVENT ENGINE ]</title><body><br><center>Current event: <font color=\"LEVEL\">");
|
||||
sb.append(L2Event._eventName);
|
||||
sb.append("</font></center><br><table cellspacing=-1 width=280><tr><td align=center>Type the team ID(s) that will be affected by the commands. Commands with '*' work with only 1 team ID in the field, while '!' - none.</td></tr><tr><td align=center><edit var=\"team_number\" width=100 height=15></td></tr>");
|
||||
sb.append("<tr><td> </td></tr><tr><td><table width=200>");
|
||||
@@ -571,7 +537,7 @@ public class AdminEventEngine implements IAdminCommandHandler
|
||||
sb.append("<tr><td><button value=\"Start!\" action=\"bypass -h admin_event_control_begin\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Destroys all event npcs so no more people can't participate now on</font></td></tr>");
|
||||
}
|
||||
|
||||
sb.append("<tr><td> </td></tr><tr><td><button value=\"Teleport\" action=\"bypass -h admin_event_control_teleport $team_number\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Teleports the specified team to your position</font></td></tr><tr><td> </td></tr><tr><td><button value=\"Sit/Stand\" action=\"bypass -h admin_event_control_sit $team_number\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Sits/Stands up the team</font></td></tr><tr><td> </td></tr><tr><td><button value=\"Kill\" action=\"bypass -h admin_event_control_kill $team_number\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Finish with the life of all the players in the selected team</font></td></tr><tr><td> </td></tr><tr><td><button value=\"Resurrect\" action=\"bypass -h admin_event_control_res $team_number\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Resurrect Team's members</font></td></tr><tr><td> </td></tr><tr><td><table cellspacing=-1><tr><td><button value=\"Polymorph*\" action=\"bypass -h admin_event_control_poly $team_number $poly_id\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr><tr><td><edit var=\"poly_id\" width=98 height=15></td></tr></table></td><td><font color=\"LEVEL\">Polymorphs the team into the NPC with the ID specified. Multiple IDs result in randomly chosen one for each player.</font></td></tr><tr><td> </td></tr><tr><td><button value=\"UnPolymorph\" action=\"bypass -h admin_event_control_unpoly $team_number\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Unpolymorph the team</font></td></tr><tr><td> </td></tr><tr><td><table cellspacing=-1><tr><td><button value=\"Transform*\" action=\"bypass -h admin_event_control_transform $team_number $transf_id\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr><tr><td><edit var=\"transf_id\" width=98 height=15></td></tr></table></td><td><font color=\"LEVEL\">Transforms the team into the transformation with the ID specified. Multiple IDs result in randomly chosen one for each player.</font></td></tr><tr><td> </td></tr><tr><td><button value=\"UnTransform\" action=\"bypass -h admin_event_control_untransform $team_number\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Untransforms the team</font></td></tr><tr><td> </td></tr><tr><td><table cellspacing=-1><tr><td><button value=\"Give Item\" action=\"bypass -h admin_event_control_prize $team_number $n $id\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table><table><tr><td width=32>Num</td><td><edit var=\"n\" width=60 height=15></td></tr><tr><td>ID</td><td><edit var=\"id\" width=60 height=15></td></tr></table></td><td><font color=\"LEVEL\">Give the specified item id to every single member of the team, you can put 5*level, 5*kills or 5 in the number field for example</font></td></tr><tr><td> </td></tr><tr><td><table cellspacing=-1><tr><td><button value=\"Kick Player\" action=\"bypass -h admin_event_control_kick $player_name\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr><tr><td><edit var=\"player_name\" width=98 height=15></td></tr></table></td><td><font color=\"LEVEL\">Kicks the specified player(s) from the event. Blank field kicks target.</font></td></tr><tr><td> </td></tr><tr><td><button value=\"End!\" action=\"bypass -h admin_event_control_finish\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Will finish the event teleporting back all the players</font></td></tr><tr><td> </td></tr></table></td></tr></table></body></html>");
|
||||
sb.append("<tr><td> </td></tr><tr><td><button value=\"Teleport\" action=\"bypass -h admin_event_control_teleport $team_number\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Teleports the specified team to your position</font></td></tr><tr><td> </td></tr><tr><td><button value=\"Sit/Stand\" action=\"bypass -h admin_event_control_sit $team_number\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Sits/Stands up the team</font></td></tr><tr><td> </td></tr><tr><td><button value=\"Kill\" action=\"bypass -h admin_event_control_kill $team_number\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Finish with the life of all the players in the selected team</font></td></tr><tr><td> </td></tr><tr><td><button value=\"Resurrect\" action=\"bypass -h admin_event_control_res $team_number\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Resurrect Team's members</font></td></tr><tr><td> </td></tr><tr><td><table cellspacing=-1><tr><td><button value=\"Transform*\" action=\"bypass -h admin_event_control_transform $team_number $transf_id\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr><tr><td><edit var=\"transf_id\" width=98 height=15></td></tr></table></td><td><font color=\"LEVEL\">Transforms the team into the transformation with the ID specified. Multiple IDs result in randomly chosen one for each player.</font></td></tr><tr><td> </td></tr><tr><td><button value=\"UnTransform\" action=\"bypass -h admin_event_control_untransform $team_number\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Untransforms the team</font></td></tr><tr><td> </td></tr><tr><td><table cellspacing=-1><tr><td><button value=\"Give Item\" action=\"bypass -h admin_event_control_prize $team_number $n $id\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr></table><table><tr><td width=32>Num</td><td><edit var=\"n\" width=60 height=15></td></tr><tr><td>ID</td><td><edit var=\"id\" width=60 height=15></td></tr></table></td><td><font color=\"LEVEL\">Give the specified item id to every single member of the team, you can put 5*level, 5*kills or 5 in the number field for example</font></td></tr><tr><td> </td></tr><tr><td><table cellspacing=-1><tr><td><button value=\"Kick Player\" action=\"bypass -h admin_event_control_kick $player_name\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td></tr><tr><td><edit var=\"player_name\" width=98 height=15></td></tr></table></td><td><font color=\"LEVEL\">Kicks the specified player(s) from the event. Blank field kicks target.</font></td></tr><tr><td> </td></tr><tr><td><button value=\"End!\" action=\"bypass -h admin_event_control_finish\" width=100 height=20 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\"></td><td><font color=\"LEVEL\">Will finish the event teleporting back all the players</font></td></tr><tr><td> </td></tr></table></td></tr></table></body></html>");
|
||||
|
||||
adminReply.setHtml(sb.toString());
|
||||
activeChar.sendPacket(adminReply);
|
||||
|
@@ -458,9 +458,7 @@ public class AdminSpawn implements IAdminCommandHandler
|
||||
try
|
||||
{
|
||||
final L2Spawn spawn = new L2Spawn(template);
|
||||
spawn.setX(target.getX());
|
||||
spawn.setY(target.getY());
|
||||
spawn.setZ(target.getZ());
|
||||
spawn.setXYZ(target);
|
||||
spawn.setAmount(mobCount);
|
||||
spawn.setHeading(activeChar.getHeading());
|
||||
spawn.setRespawnDelay(respawnTime);
|
||||
|
@@ -546,9 +546,7 @@ public class AdminTeleport implements IAdminCommandHandler
|
||||
try
|
||||
{
|
||||
spawn = new L2Spawn(target.getTemplate().getId());
|
||||
spawn.setX(activeChar.getX());
|
||||
spawn.setY(activeChar.getY());
|
||||
spawn.setZ(activeChar.getZ());
|
||||
spawn.setXYZ(activeChar);
|
||||
spawn.setAmount(1);
|
||||
spawn.setHeading(activeChar.getHeading());
|
||||
spawn.setRespawnDelay(respawnTime);
|
||||
@@ -587,9 +585,7 @@ public class AdminTeleport implements IAdminCommandHandler
|
||||
try
|
||||
{
|
||||
final L2Spawn spawnDat = new L2Spawn(target.getId());
|
||||
spawnDat.setX(activeChar.getX());
|
||||
spawnDat.setY(activeChar.getY());
|
||||
spawnDat.setZ(activeChar.getZ());
|
||||
spawnDat.setXYZ(activeChar);
|
||||
spawnDat.setAmount(1);
|
||||
spawnDat.setHeading(activeChar.getHeading());
|
||||
spawnDat.setRespawnMinDelay(43200);
|
||||
|
@@ -22,21 +22,16 @@ import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.SetupGauge;
|
||||
import com.l2jmobius.gameserver.util.BuilderUtil;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
* Polymorph admin command implementation.
|
||||
* @author Zoey76
|
||||
* @author Mobius
|
||||
*/
|
||||
public class AdminPolymorph implements IAdminCommandHandler
|
||||
public class AdminTransform implements IAdminCommandHandler
|
||||
{
|
||||
private static final String[] ADMIN_COMMANDS =
|
||||
{
|
||||
"admin_polymorph",
|
||||
"admin_unpolymorph",
|
||||
"admin_transform",
|
||||
"admin_untransform",
|
||||
"admin_transform_menu",
|
||||
@@ -115,28 +110,6 @@ public class AdminPolymorph implements IAdminCommandHandler
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (command.startsWith("admin_polymorph"))
|
||||
{
|
||||
final String[] parts = command.split(" ");
|
||||
if ((parts.length < 2) || !Util.isDigit(parts[1]))
|
||||
{
|
||||
BuilderUtil.sendSysMessage(activeChar, "Usage: //polymorph [type] <id>");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (parts.length > 2)
|
||||
{
|
||||
doPolymorph(activeChar, activeChar.getTarget(), parts[2], parts[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
doPolymorph(activeChar, activeChar.getTarget(), parts[1], "npc");
|
||||
}
|
||||
}
|
||||
else if (command.equals("admin_unpolymorph"))
|
||||
{
|
||||
doUnPolymorph(activeChar, activeChar.getTarget());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -146,56 +119,4 @@ public class AdminPolymorph implements IAdminCommandHandler
|
||||
{
|
||||
return ADMIN_COMMANDS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Polymorph a creature.
|
||||
* @param activeChar the active Game Master
|
||||
* @param obj the target
|
||||
* @param id the polymorph ID
|
||||
* @param type the polymorph type
|
||||
*/
|
||||
private static void doPolymorph(L2PcInstance activeChar, L2Object obj, String id, String type)
|
||||
{
|
||||
if (obj != null)
|
||||
{
|
||||
obj.getPoly().setPolyInfo(type, id);
|
||||
// animation
|
||||
if (obj.isCharacter())
|
||||
{
|
||||
final L2Character Char = (L2Character) obj;
|
||||
final MagicSkillUse msk = new MagicSkillUse(Char, 1008, 1, 4000, 0);
|
||||
Char.broadcastPacket(msk);
|
||||
final SetupGauge sg = new SetupGauge(Char.getObjectId(), 0, 4000);
|
||||
Char.sendPacket(sg);
|
||||
}
|
||||
// end of animation
|
||||
obj.decayMe();
|
||||
obj.spawnMe(obj.getX(), obj.getY(), obj.getZ());
|
||||
BuilderUtil.sendSysMessage(activeChar, "Polymorph succeed");
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unpolymorh a creature.
|
||||
* @param activeChar the active Game Master
|
||||
* @param target the target
|
||||
*/
|
||||
private static void doUnPolymorph(L2PcInstance activeChar, L2Object target)
|
||||
{
|
||||
if (target != null)
|
||||
{
|
||||
target.getPoly().setPolyInfo(null, "1");
|
||||
target.decayMe();
|
||||
target.spawnMe(target.getX(), target.getY(), target.getZ());
|
||||
BuilderUtil.sendSysMessage(activeChar, "Unpolymorph succeed");
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
||||
}
|
||||
}
|
||||
}
|
@@ -159,9 +159,7 @@ public final class SummonNpc extends AbstractEffect
|
||||
y += (Rnd.nextBoolean() ? Rnd.get(20, 50) : Rnd.get(-50, -20));
|
||||
}
|
||||
|
||||
spawn.setX(x);
|
||||
spawn.setY(y);
|
||||
spawn.setZ(player.getZ());
|
||||
spawn.setXYZ(x, y, player.getZ());
|
||||
spawn.setHeading(player.getHeading());
|
||||
spawn.stopRespawn();
|
||||
|
||||
|
Reference in New Issue
Block a user