Removed custom poly system.
This commit is contained in:
parent
ba916da04d
commit
c126283ceb
@ -217,10 +217,6 @@
|
|||||||
<admin command="admin_para_all_menu" accessLevel="80" />
|
<admin command="admin_para_all_menu" accessLevel="80" />
|
||||||
<admin command="admin_unpara_menu" accessLevel="80" />
|
<admin command="admin_unpara_menu" accessLevel="80" />
|
||||||
<admin command="admin_para_menu" accessLevel="80" />
|
<admin command="admin_para_menu" accessLevel="80" />
|
||||||
<admin command="admin_polyself" accessLevel="80" />
|
|
||||||
<admin command="admin_unpolyself" accessLevel="80" />
|
|
||||||
<admin command="admin_polyself_menu" accessLevel="80" />
|
|
||||||
<admin command="admin_unpolyself_menu" accessLevel="80" />
|
|
||||||
<admin command="admin_clearteams" accessLevel="80" />
|
<admin command="admin_clearteams" accessLevel="80" />
|
||||||
<admin command="admin_setteam_close" accessLevel="80" /> <!-- set all Gm close players to val team -->
|
<admin command="admin_setteam_close" accessLevel="80" /> <!-- set all Gm close players to val team -->
|
||||||
<admin command="admin_setteam" accessLevel="80" />
|
<admin command="admin_setteam" accessLevel="80" />
|
||||||
@ -274,8 +270,6 @@
|
|||||||
<admin command="admin_event_name" accessLevel="80" />
|
<admin command="admin_event_name" accessLevel="80" />
|
||||||
<admin command="admin_event_control_kill" accessLevel="80" />
|
<admin command="admin_event_control_kill" accessLevel="80" />
|
||||||
<admin command="admin_event_control_res" accessLevel="80" />
|
<admin command="admin_event_control_res" accessLevel="80" />
|
||||||
<admin command="admin_event_control_poly" accessLevel="80" />
|
|
||||||
<admin command="admin_event_control_unpoly" accessLevel="80" />
|
|
||||||
<admin command="admin_event_control_prize" accessLevel="80" />
|
<admin command="admin_event_control_prize" accessLevel="80" />
|
||||||
<admin command="admin_event_control_chatban" accessLevel="80" />
|
<admin command="admin_event_control_chatban" accessLevel="80" />
|
||||||
<admin command="admin_event_control_finish" accessLevel="80" />
|
<admin command="admin_event_control_finish" accessLevel="80" />
|
||||||
@ -427,12 +421,6 @@
|
|||||||
<!-- Section: Pledge -->
|
<!-- Section: Pledge -->
|
||||||
<admin command="admin_pledge" accessLevel="90" /> <!-- Manage Clan -->
|
<admin command="admin_pledge" accessLevel="90" /> <!-- Manage Clan -->
|
||||||
|
|
||||||
<!-- Section: Polymorph -->
|
|
||||||
<admin command="admin_polymorph" accessLevel="90" />
|
|
||||||
<admin command="admin_unpolymorph" accessLevel="90" />
|
|
||||||
<admin command="admin_polymorph_menu" accessLevel="90" />
|
|
||||||
<admin command="admin_unpolymorph_menu" accessLevel="90" />
|
|
||||||
|
|
||||||
<!-- Section: Quest -->
|
<!-- Section: Quest -->
|
||||||
<admin command="admin_quest_reload" accessLevel="90" />
|
<admin command="admin_quest_reload" accessLevel="90" />
|
||||||
|
|
||||||
|
@ -11,12 +11,8 @@
|
|||||||
<td><edit var="menu_command" width=120 height=15></td>
|
<td><edit var="menu_command" width=120 height=15></td>
|
||||||
<td><button value="Help" action="bypass -h admin_help help/effects_menu.htm" width=45 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
<td><button value="Help" action="bypass -h admin_help help/effects_menu.htm" width=45 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
||||||
</tr></table><br>
|
</tr></table><br>
|
||||||
<font color="aadd77">Trasformations</font><table width=240><tr>
|
<font color="aadd77">Effects</font><table width=240>
|
||||||
<td><button value="PolyMorph" action="bypass -h admin_polymorph_menu $menu_command" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
<tr>
|
||||||
<td><button value="UnPoly" action="bypass -h admin_unpolymorph_menu" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
|
||||||
<td><button value="PolySelf" action="bypass -h admin_polyself_menu $menu_command" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
|
||||||
<td><button value="UnPolySlf" action="bypass -h admin_unpolyself_menu" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
|
||||||
</tr><tr>
|
|
||||||
<td><button value="Para" action="bypass -h admin_para_menu $menu_command" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
<td><button value="Para" action="bypass -h admin_para_menu $menu_command" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
||||||
<td><button value="UnPara" action="bypass -h admin_unpara_menu $menu_command" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
<td><button value="UnPara" action="bypass -h admin_unpara_menu $menu_command" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
||||||
<td><button value="ParaAll" action="bypass -h admin_para_all_menu" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
<td><button value="ParaAll" action="bypass -h admin_para_all_menu" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
3-Effect Panel Buttons<br></font>
|
3-Effect Panel Buttons<br></font>
|
||||||
L2 special effects are here: earthquakes, sky changes, weird character and mob animations.<br>
|
L2 special effects are here: earthquakes, sky changes, weird character and mob animations.<br>
|
||||||
<font color="LEVEL">3-1 First pack of effects.<br>
|
<font color="LEVEL">3-1 First pack of effects.<br>
|
||||||
PolyMorph:</font> Make your target (player) look like the specified mob.<br>
|
|
||||||
<font color="LEVEL">Unpoly:</font> Cancel polymorph effects that specified target may have.<br>
|
|
||||||
<font color="LEVEL">PolySelf:</font> Polymorph yourself to specified npcId, you will see a title change only.<br>
|
|
||||||
<font color="LEVEL">UnPolySelf:</font> Cancel any polymorph effect you could have.<br>
|
|
||||||
<font color="LEVEL">Para:</font> Paralyze character (target/name).<br>
|
<font color="LEVEL">Para:</font> Paralyze character (target/name).<br>
|
||||||
<font color="LEVEL">UnPara:</font> Cancel Paralysis effect (target/name).<br>
|
<font color="LEVEL">UnPara:</font> Cancel Paralysis effect (target/name).<br>
|
||||||
<font color="LEVEL">ParaAll:</font> Paralyze any character in the world, but yours. Use wisely, annoys people and causes lag.<br>
|
<font color="LEVEL">ParaAll:</font> Paralyze any character in the world, but yours. Use wisely, annoys people and causes lag.<br>
|
||||||
|
@ -52,10 +52,5 @@
|
|||||||
<font color="LEVEL">//setew value</font> - Sets enchantment of target player currently equipped weapon to value<br><font color="FF9933">Usage: //setew 9999</font><br>
|
<font color="LEVEL">//setew value</font> - Sets enchantment of target player currently equipped weapon to value<br><font color="FF9933">Usage: //setew 9999</font><br>
|
||||||
<font color="LEVEL">//banchat</font> - Mutes a player<br><font color="FF9933">Usage: //banchat kadar </font><br>
|
<font color="LEVEL">//banchat</font> - Mutes a player<br><font color="FF9933">Usage: //banchat kadar </font><br>
|
||||||
<font color="LEVEL">//unbanchat</font> - Unmutes a player<br><font color="FF9933">Usage: //unbanchat kadar </font><br>
|
<font color="LEVEL">//unbanchat</font> - Unmutes a player<br><font color="FF9933">Usage: //unbanchat kadar </font><br>
|
||||||
<font color="LEVEL">//polymorph character npc id </font><br>
|
|
||||||
<font color="LEVEL">//polymorph item id to poly target into id|</font><br>
|
|
||||||
<font color="LEVEL">//polyself <npc id></font> - Used to polymorph yourself into a mob<br>
|
|
||||||
<font color="LEVEL">//unpolyself</font> - Returns you to the normal state<br>
|
|
||||||
<font color="LEVEL">//polymorph item <itemid></font> - Polymorphs an item<br>
|
|
||||||
<center><button value="Index" action="bypass -h admin_help admhelp.htm" width=60 height=15 back="sek.cbui94" fore="sek.cbui92"></center>
|
<center><button value="Index" action="bypass -h admin_help admhelp.htm" width=60 height=15 back="sek.cbui94" fore="sek.cbui92"></center>
|
||||||
</body></html>
|
</body></html>
|
@ -67,7 +67,6 @@ import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminOnline;
|
|||||||
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminPForge;
|
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminPForge;
|
||||||
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminPetition;
|
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminPetition;
|
||||||
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminPledge;
|
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminPledge;
|
||||||
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminPolymorph;
|
|
||||||
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminQuest;
|
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminQuest;
|
||||||
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminReload;
|
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminReload;
|
||||||
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminRepairChar;
|
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminRepairChar;
|
||||||
@ -147,7 +146,6 @@ public class AdminCommandHandler
|
|||||||
registerAdminCommandHandler(new AdminPetition());
|
registerAdminCommandHandler(new AdminPetition());
|
||||||
registerAdminCommandHandler(new AdminPForge());
|
registerAdminCommandHandler(new AdminPForge());
|
||||||
registerAdminCommandHandler(new AdminPledge());
|
registerAdminCommandHandler(new AdminPledge());
|
||||||
registerAdminCommandHandler(new AdminPolymorph());
|
|
||||||
registerAdminCommandHandler(new AdminQuest());
|
registerAdminCommandHandler(new AdminQuest());
|
||||||
registerAdminCommandHandler(new AdminReload());
|
registerAdminCommandHandler(new AdminReload());
|
||||||
registerAdminCommandHandler(new AdminRepairChar());
|
registerAdminCommandHandler(new AdminRepairChar());
|
||||||
|
@ -27,7 +27,6 @@ import org.l2jmobius.gameserver.model.actor.instance.ChestInstance;
|
|||||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CharInfo;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Earthquake;
|
import org.l2jmobius.gameserver.network.serverpackets.Earthquake;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ExRedSky;
|
import org.l2jmobius.gameserver.network.serverpackets.ExRedSky;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.GameServerPacket;
|
import org.l2jmobius.gameserver.network.serverpackets.GameServerPacket;
|
||||||
@ -38,7 +37,6 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.StopMove;
|
import org.l2jmobius.gameserver.network.serverpackets.StopMove;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SunRise;
|
import org.l2jmobius.gameserver.network.serverpackets.SunRise;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SunSet;
|
import org.l2jmobius.gameserver.network.serverpackets.SunSet;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
import org.l2jmobius.gameserver.util.BuilderUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,7 +47,6 @@ import org.l2jmobius.gameserver.util.BuilderUtil;
|
|||||||
* <li>gmspeed = temporary Super Haste effect.
|
* <li>gmspeed = temporary Super Haste effect.
|
||||||
* <li>para/unpara = paralyze/remove paralysis from target
|
* <li>para/unpara = paralyze/remove paralysis from target
|
||||||
* <li>para_all/unpara_all = same as para/unpara, affects the whole world.
|
* <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>changename = temporary change name
|
||||||
* <li>clearteams/setteam_close/setteam = team related commands
|
* <li>clearteams/setteam_close/setteam = team related commands
|
||||||
* <li>social = forces an Creature instance to broadcast social action packets.
|
* <li>social = forces an Creature instance to broadcast social action packets.
|
||||||
@ -80,10 +77,6 @@ public class AdminEffects implements IAdminCommandHandler
|
|||||||
"admin_para_all_menu",
|
"admin_para_all_menu",
|
||||||
"admin_unpara_menu",
|
"admin_unpara_menu",
|
||||||
"admin_para_menu",
|
"admin_para_menu",
|
||||||
"admin_polyself",
|
|
||||||
"admin_unpolyself",
|
|
||||||
"admin_polyself_menu",
|
|
||||||
"admin_unpolyself_menu",
|
|
||||||
"admin_clearteams",
|
"admin_clearteams",
|
||||||
"admin_setteam_close",
|
"admin_setteam_close",
|
||||||
"admin_setteam",
|
"admin_setteam",
|
||||||
@ -333,34 +326,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.getX(), activeChar.getY(), activeChar.getZ(), false);
|
|
||||||
activeChar.broadcastPacket(new CharInfo(activeChar));
|
|
||||||
activeChar.sendPacket(new UserInfo(activeChar));
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (command.startsWith("admin_unpolyself"))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
activeChar.getPoly().setPolyInfo(null, "1");
|
|
||||||
activeChar.decayMe();
|
|
||||||
activeChar.spawnMe(activeChar.getX(), activeChar.getY(), activeChar.getZ());
|
|
||||||
activeChar.broadcastPacket(new CharInfo(activeChar));
|
|
||||||
activeChar.sendPacket(new UserInfo(activeChar));
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (command.equals("admin_clear_teams"))
|
else if (command.equals("admin_clear_teams"))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -36,13 +36,11 @@ import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
|||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.entity.event.GameEvent;
|
import org.l2jmobius.gameserver.model.entity.event.GameEvent;
|
||||||
import org.l2jmobius.gameserver.model.spawn.Spawn;
|
import org.l2jmobius.gameserver.model.spawn.Spawn;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CharInfo;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ItemList;
|
import org.l2jmobius.gameserver.network.serverpackets.ItemList;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Revive;
|
import org.l2jmobius.gameserver.network.serverpackets.Revive;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class handles following admin commands: - admin = shows menu
|
* This class handles following admin commands: - admin = shows menu
|
||||||
@ -70,8 +68,6 @@ public class AdminEventEngine implements IAdminCommandHandler
|
|||||||
"admin_event_name",
|
"admin_event_name",
|
||||||
"admin_event_control_kill",
|
"admin_event_control_kill",
|
||||||
"admin_event_control_res",
|
"admin_event_control_res",
|
||||||
"admin_event_control_poly",
|
|
||||||
"admin_event_control_unpoly",
|
|
||||||
"admin_event_control_prize",
|
"admin_event_control_prize",
|
||||||
"admin_event_control_chatban",
|
"admin_event_control_chatban",
|
||||||
"admin_event_control_finish"
|
"admin_event_control_finish"
|
||||||
@ -340,30 +336,6 @@ public class AdminEventEngine implements IAdminCommandHandler
|
|||||||
|
|
||||||
showEventControl(activeChar);
|
showEventControl(activeChar);
|
||||||
}
|
}
|
||||||
else if (command.startsWith("admin_event_control_poly"))
|
|
||||||
{
|
|
||||||
final StringTokenizer st0 = new StringTokenizer(command.substring(25));
|
|
||||||
final StringTokenizer st = new StringTokenizer(st0.nextToken(), "-");
|
|
||||||
final String id = st0.nextToken();
|
|
||||||
|
|
||||||
while (st.hasMoreElements())
|
|
||||||
{
|
|
||||||
polyTeam(Integer.parseInt(st.nextToken()), id);
|
|
||||||
}
|
|
||||||
|
|
||||||
showEventControl(activeChar);
|
|
||||||
}
|
|
||||||
else if (command.startsWith("admin_event_control_unpoly"))
|
|
||||||
{
|
|
||||||
final StringTokenizer st = new StringTokenizer(command.substring(27), "-");
|
|
||||||
|
|
||||||
while (st.hasMoreElements())
|
|
||||||
{
|
|
||||||
unpolyTeam(Integer.parseInt(st.nextToken()));
|
|
||||||
}
|
|
||||||
|
|
||||||
showEventControl(activeChar);
|
|
||||||
}
|
|
||||||
else if (command.startsWith("admin_event_control_prize"))
|
else if (command.startsWith("admin_event_control_prize"))
|
||||||
{
|
{
|
||||||
final StringTokenizer st0 = new StringTokenizer(command.substring(26));
|
final StringTokenizer st0 = new StringTokenizer(command.substring(26));
|
||||||
@ -599,11 +571,6 @@ public class AdminEventEngine implements IAdminCommandHandler
|
|||||||
replyMSG.append("<tr><td> </td></tr>");
|
replyMSG.append("<tr><td> </td></tr>");
|
||||||
replyMSG.append("<tr><td><button value=\"Resurrect\" action=\"bypass -h admin_event_control_res $team_number\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><font color=\"LEVEL\">Resurrect Team's members</font></td></tr>");
|
replyMSG.append("<tr><td><button value=\"Resurrect\" action=\"bypass -h admin_event_control_res $team_number\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><font color=\"LEVEL\">Resurrect Team's members</font></td></tr>");
|
||||||
replyMSG.append("<tr><td> </td></tr>");
|
replyMSG.append("<tr><td> </td></tr>");
|
||||||
replyMSG.append("<tr><td><button value=\"Polymorph\" action=\"bypass -h admin_event_control_poly $team_number $poly_id\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><edit var=\"poly_id\" width=100 height=15><font color=\"LEVEL\">Polymorphs the team into the NPC with the id specified</font></td></tr>");
|
|
||||||
replyMSG.append("<tr><td> </td></tr>");
|
|
||||||
replyMSG.append("<tr><td><button value=\"UnPolymorph\" action=\"bypass -h admin_event_control_unpoly $team_number\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><font color=\"LEVEL\">Unpolymorph the team</font></td></tr>");
|
|
||||||
replyMSG.append("<tr><td> </td></tr>");
|
|
||||||
replyMSG.append("<tr><td> </td></tr>");
|
|
||||||
replyMSG.append("<tr><td><button value=\"Give Item\" action=\"bypass -h admin_event_control_prize $team_number $n $id\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"> number <edit var=\"n\" width=100 height=15> item id <edit var=\"id\" width=100 height=15></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>");
|
replyMSG.append("<tr><td><button value=\"Give Item\" action=\"bypass -h admin_event_control_prize $team_number $n $id\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"> number <edit var=\"n\" width=100 height=15> item id <edit var=\"id\" width=100 height=15></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>");
|
||||||
replyMSG.append("<tr><td> </td></tr>");
|
replyMSG.append("<tr><td> </td></tr>");
|
||||||
replyMSG.append("<tr><td><button value=\"End\" action=\"bypass -h admin_event_control_finish\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><font color=\"LEVEL\">Will finish the event teleporting back all the players</font></td></tr>");
|
replyMSG.append("<tr><td><button value=\"End\" action=\"bypass -h admin_event_control_finish\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><font color=\"LEVEL\">Will finish the event teleporting back all the players</font></td></tr>");
|
||||||
@ -763,49 +730,6 @@ public class AdminEventEngine implements IAdminCommandHandler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void polyTeam(int team, String id)
|
|
||||||
{
|
|
||||||
final LinkedList<String> linked = GameEvent.players.get(team);
|
|
||||||
final Iterator<String> it = linked.iterator();
|
|
||||||
|
|
||||||
while (it.hasNext())
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
final PlayerInstance target = World.getInstance().getPlayer(it.next());
|
|
||||||
target.getPoly().setPolyInfo("npc", id);
|
|
||||||
target.teleToLocation(target.getX(), target.getY(), target.getZ(), true);
|
|
||||||
target.broadcastPacket(new CharInfo(target));
|
|
||||||
target.sendPacket(new UserInfo(target));
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void unpolyTeam(int team)
|
|
||||||
{
|
|
||||||
final LinkedList<String> linked = GameEvent.players.get(team);
|
|
||||||
final Iterator<String> it = linked.iterator();
|
|
||||||
|
|
||||||
while (it.hasNext())
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
final PlayerInstance target = World.getInstance().getPlayer(it.next());
|
|
||||||
target.getPoly().setPolyInfo(null, "1");
|
|
||||||
target.decayMe();
|
|
||||||
target.spawnMe(target.getX(), target.getY(), target.getZ());
|
|
||||||
target.broadcastPacket(new CharInfo(target));
|
|
||||||
target.sendPacket(new UserInfo(target));
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createItem(PlayerInstance activeChar, PlayerInstance player, int id, int num)
|
private void createItem(PlayerInstance activeChar, PlayerInstance player, int id, int num)
|
||||||
{
|
{
|
||||||
player.getInventory().addItem("Event", id, num, player, activeChar);
|
player.getInventory().addItem("Event", id, num, player, activeChar);
|
||||||
@ -855,7 +779,6 @@ public class AdminEventEngine implements IAdminCommandHandler
|
|||||||
void telePlayersBack(int team)
|
void telePlayersBack(int team)
|
||||||
{
|
{
|
||||||
resTeam(team);
|
resTeam(team);
|
||||||
unpolyTeam(team);
|
|
||||||
|
|
||||||
final LinkedList<String> linked = GameEvent.players.get(team);
|
final LinkedList<String> linked = GameEvent.players.get(team);
|
||||||
final Iterator<String> it = linked.iterator();
|
final Iterator<String> it = linked.iterator();
|
||||||
|
@ -1,135 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the L2J Mobius project.
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package org.l2jmobius.gameserver.handler.admincommandhandlers;
|
|
||||||
|
|
||||||
import java.util.StringTokenizer;
|
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
|
||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SetupGauge;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This class handles following admin commands: polymorph
|
|
||||||
* @version $Revision: 1.2.2.1.2.4 $ $Date: 2007/07/31 10:05:56 $
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class AdminPolymorph implements IAdminCommandHandler
|
|
||||||
{
|
|
||||||
private static final String[] ADMIN_COMMANDS =
|
|
||||||
{
|
|
||||||
"admin_polymorph",
|
|
||||||
"admin_unpolymorph",
|
|
||||||
"admin_polymorph_menu",
|
|
||||||
"admin_unpolymorph_menu"
|
|
||||||
};
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean useAdminCommand(String command, PlayerInstance activeChar)
|
|
||||||
{
|
|
||||||
if (command.startsWith("admin_polymorph"))
|
|
||||||
{
|
|
||||||
final StringTokenizer st = new StringTokenizer(command);
|
|
||||||
final WorldObject target = activeChar.getTarget();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
st.nextToken();
|
|
||||||
final String p1 = st.nextToken();
|
|
||||||
if (st.hasMoreTokens())
|
|
||||||
{
|
|
||||||
final String p2 = st.nextToken();
|
|
||||||
doPolymorph(activeChar, target, p2, p1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
doPolymorph(activeChar, target, p1, "npc");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Usage: //polymorph [type] <id>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (command.equals("admin_unpolymorph"))
|
|
||||||
{
|
|
||||||
doUnpoly(activeChar, activeChar.getTarget());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (command.contains("menu"))
|
|
||||||
{
|
|
||||||
showMainPage(activeChar);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String[] getAdminCommandList()
|
|
||||||
{
|
|
||||||
return ADMIN_COMMANDS;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void doPolymorph(PlayerInstance activeChar, WorldObject obj, String id, String type)
|
|
||||||
{
|
|
||||||
if (obj != null)
|
|
||||||
{
|
|
||||||
obj.getPoly().setPolyInfo(type, id);
|
|
||||||
|
|
||||||
// animation
|
|
||||||
if (obj instanceof Creature)
|
|
||||||
{
|
|
||||||
final Creature creature = (Creature) obj;
|
|
||||||
creature.broadcastPacket(new MagicSkillUse(creature, creature, 1008, 1, 4000, 0));
|
|
||||||
creature.sendPacket(new SetupGauge(0, 4000));
|
|
||||||
}
|
|
||||||
|
|
||||||
// end of animation
|
|
||||||
obj.decayMe();
|
|
||||||
obj.spawnMe(obj.getX(), obj.getY(), obj.getZ());
|
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Polymorph succeed");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void doUnpoly(PlayerInstance activeChar, WorldObject 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void showMainPage(PlayerInstance activeChar)
|
|
||||||
{
|
|
||||||
AdminHelpPage.showHelpPage(activeChar, "effects_menu.htm");
|
|
||||||
}
|
|
||||||
}
|
|
@ -25,7 +25,6 @@ import org.l2jmobius.gameserver.instancemanager.MercTicketManager;
|
|||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.knownlist.WorldObjectKnownList;
|
import org.l2jmobius.gameserver.model.actor.knownlist.WorldObjectKnownList;
|
||||||
import org.l2jmobius.gameserver.model.actor.poly.ObjectPoly;
|
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@ -47,7 +46,6 @@ public abstract class WorldObject
|
|||||||
private WorldObjectKnownList _knownList;
|
private WorldObjectKnownList _knownList;
|
||||||
private String _name;
|
private String _name;
|
||||||
private int _objectId;
|
private int _objectId;
|
||||||
private ObjectPoly _poly;
|
|
||||||
private ObjectPosition _position;
|
private ObjectPosition _position;
|
||||||
|
|
||||||
// Objects can only see objects in same instancezone, instance 0 is normal world -1 the all seeing world
|
// Objects can only see objects in same instancezone, instance 0 is normal world -1 the all seeing world
|
||||||
@ -351,15 +349,6 @@ public abstract class WorldObject
|
|||||||
return _objectId;
|
return _objectId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObjectPoly getPoly()
|
|
||||||
{
|
|
||||||
if (_poly == null)
|
|
||||||
{
|
|
||||||
_poly = new ObjectPoly(this);
|
|
||||||
}
|
|
||||||
return _poly;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ObjectPosition getPosition()
|
public ObjectPosition getPosition()
|
||||||
{
|
{
|
||||||
if (_position == null)
|
if (_position == null)
|
||||||
|
@ -4082,7 +4082,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
* In Server->Client packet, each effect is represented by 1 bit of the map (ex : BLEEDING = 0x0001 (bit 1), SLEEP = 0x0080 (bit 8)...). The map is calculated by applying a BINARY OR operation on each effect.<br>
|
* In Server->Client packet, each effect is represented by 1 bit of the map (ex : BLEEDING = 0x0001 (bit 1), SLEEP = 0x0080 (bit 8)...). The map is calculated by applying a BINARY OR operation on each effect.<br>
|
||||||
* <br>
|
* <br>
|
||||||
* <b><u>Example of use</u>:</b><br>
|
* <b><u>Example of use</u>:</b><br>
|
||||||
* <li>Server Packet : CharInfo, NpcInfo, NpcInfoPoly, UserInfo...</li>
|
* <li>Server Packet : CharInfo, NpcInfo, UserInfo...</li>
|
||||||
* @return the abnormal effect
|
* @return the abnormal effect
|
||||||
*/
|
*/
|
||||||
public int getAbnormalEffect()
|
public int getAbnormalEffect()
|
||||||
|
@ -44,7 +44,6 @@ import org.l2jmobius.gameserver.network.serverpackets.PrivateStoreMsgSell;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.RecipeShopMsg;
|
import org.l2jmobius.gameserver.network.serverpackets.RecipeShopMsg;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.RelationChanged;
|
import org.l2jmobius.gameserver.network.serverpackets.RelationChanged;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SpawnItem;
|
import org.l2jmobius.gameserver.network.serverpackets.SpawnItem;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SpawnItemPoly;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.StaticObject;
|
import org.l2jmobius.gameserver.network.serverpackets.StaticObject;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.VehicleInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.VehicleInfo;
|
||||||
|
|
||||||
@ -118,12 +117,6 @@ public class PlayerKnownList extends PlayableKnownList
|
|||||||
// Send packets asynchronously. (Obviously heavier on CPU, but significantly reduces network spikes.)
|
// Send packets asynchronously. (Obviously heavier on CPU, but significantly reduces network spikes.)
|
||||||
// On retail there is a similar, if not greater, delay as well.
|
// On retail there is a similar, if not greater, delay as well.
|
||||||
ThreadPool.schedule(() ->
|
ThreadPool.schedule(() ->
|
||||||
{
|
|
||||||
if (object.getPoly().isMorphed() && object.getPoly().getPolyType().equals("item"))
|
|
||||||
{
|
|
||||||
activeChar.sendPacket(new SpawnItemPoly(object));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if (object.isItem())
|
if (object.isItem())
|
||||||
{
|
{
|
||||||
@ -240,7 +233,6 @@ public class PlayerKnownList extends PlayableKnownList
|
|||||||
objAi.describeStateToPlayer(activeChar);
|
objAi.describeStateToPlayer(activeChar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}, _packetSendDelay + Rnd.get(50)); // Add additional 0-49ms in case of overlapping tasks on heavy load.
|
}, _packetSendDelay + Rnd.get(50)); // Add additional 0-49ms in case of overlapping tasks on heavy load.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,67 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the L2J Mobius project.
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package org.l2jmobius.gameserver.model.actor.poly;
|
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
|
||||||
|
|
||||||
public class ObjectPoly
|
|
||||||
{
|
|
||||||
private final WorldObject _activeObject;
|
|
||||||
private int _polyId;
|
|
||||||
private String _polyType;
|
|
||||||
|
|
||||||
public ObjectPoly(WorldObject activeObject)
|
|
||||||
{
|
|
||||||
_activeObject = activeObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPolyInfo(String polyType, String polyId)
|
|
||||||
{
|
|
||||||
setPolyId(Integer.parseInt(polyId));
|
|
||||||
setPolyType(polyType);
|
|
||||||
}
|
|
||||||
|
|
||||||
public WorldObject getActiveObject()
|
|
||||||
{
|
|
||||||
return _activeObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isMorphed()
|
|
||||||
{
|
|
||||||
return _polyType != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getPolyId()
|
|
||||||
{
|
|
||||||
return _polyId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPolyId(int value)
|
|
||||||
{
|
|
||||||
_polyId = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPolyType()
|
|
||||||
{
|
|
||||||
return _polyType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPolyType(String value)
|
|
||||||
{
|
|
||||||
_polyType = value;
|
|
||||||
}
|
|
||||||
}
|
|
@ -35,7 +35,6 @@ import org.l2jmobius.gameserver.network.serverpackets.PetInfo;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.PetItemList;
|
import org.l2jmobius.gameserver.network.serverpackets.PetItemList;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.RelationChanged;
|
import org.l2jmobius.gameserver.network.serverpackets.RelationChanged;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SpawnItem;
|
import org.l2jmobius.gameserver.network.serverpackets.SpawnItem;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SpawnItemPoly;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.StaticObject;
|
import org.l2jmobius.gameserver.network.serverpackets.StaticObject;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.VehicleInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.VehicleInfo;
|
||||||
@ -66,12 +65,6 @@ public class RequestRecordInfo extends GameClientPacket
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (object.getPoly().isMorphed() && object.getPoly().getPolyType().equals("item"))
|
|
||||||
{
|
|
||||||
player.sendPacket(new SpawnItemPoly(object));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (object instanceof ItemInstance)
|
if (object instanceof ItemInstance)
|
||||||
{
|
{
|
||||||
player.sendPacket(new SpawnItem((ItemInstance) object));
|
player.sendPacket(new SpawnItem((ItemInstance) object));
|
||||||
@ -161,5 +154,4 @@ public class RequestRecordInfo extends GameClientPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -16,45 +16,25 @@
|
|||||||
*/
|
*/
|
||||||
package org.l2jmobius.gameserver.network.serverpackets;
|
package org.l2jmobius.gameserver.network.serverpackets;
|
||||||
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
|
||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
|
||||||
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||||
|
|
||||||
public class CharInfo extends GameServerPacket
|
public class CharInfo extends GameServerPacket
|
||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(CharInfo.class.getName());
|
|
||||||
|
|
||||||
private final PlayerInstance _player;
|
private final PlayerInstance _player;
|
||||||
private final Inventory _inventory;
|
private final Inventory _inventory;
|
||||||
private final int _x;
|
|
||||||
private final int _y;
|
|
||||||
private final int _z;
|
|
||||||
private final int _heading;
|
|
||||||
private final int _mAtkSpd;
|
|
||||||
private final int _pAtkSpd;
|
|
||||||
private final int _runSpd;
|
private final int _runSpd;
|
||||||
private final int _walkSpd;
|
private final int _walkSpd;
|
||||||
private final int _flyRunSpd;
|
private final int _flyRunSpd;
|
||||||
private final int _flyWalkSpd;
|
private final int _flyWalkSpd;
|
||||||
private final float _moveMultiplier;
|
private final float _moveMultiplier;
|
||||||
private final float _attackSpeedMultiplier;
|
|
||||||
|
|
||||||
public CharInfo(PlayerInstance player)
|
public CharInfo(PlayerInstance player)
|
||||||
{
|
{
|
||||||
_player = player;
|
_player = player;
|
||||||
_inventory = player.getInventory();
|
_inventory = player.getInventory();
|
||||||
_x = player.getX();
|
|
||||||
_y = player.getY();
|
|
||||||
_z = player.getZ();
|
|
||||||
_heading = player.getHeading();
|
|
||||||
_mAtkSpd = player.getMAtkSpd();
|
|
||||||
_pAtkSpd = player.getPAtkSpd();
|
|
||||||
_attackSpeedMultiplier = player.getAttackSpeedMultiplier();
|
|
||||||
_moveMultiplier = player.getMovementSpeedMultiplier();
|
_moveMultiplier = player.getMovementSpeedMultiplier();
|
||||||
_runSpd = Math.round(player.getRunSpeed() / _moveMultiplier);
|
_runSpd = Math.round(player.getRunSpeed() / _moveMultiplier);
|
||||||
_walkSpd = Math.round(player.getWalkSpeed() / _moveMultiplier);
|
_walkSpd = Math.round(player.getWalkSpeed() / _moveMultiplier);
|
||||||
@ -66,103 +46,20 @@ public class CharInfo extends GameServerPacket
|
|||||||
protected final void writeImpl()
|
protected final void writeImpl()
|
||||||
{
|
{
|
||||||
boolean isGM = false;
|
boolean isGM = false;
|
||||||
|
|
||||||
final PlayerInstance tmp = getClient().getPlayer();
|
final PlayerInstance tmp = getClient().getPlayer();
|
||||||
if ((tmp != null) && tmp.isGM())
|
if ((tmp != null) && tmp.isGM())
|
||||||
{
|
{
|
||||||
isGM = true;
|
isGM = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isGM && _player.getAppearance().isInvisible())
|
if (!isGM && _player.getAppearance().isInvisible())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_player.getPoly().isMorphed())
|
|
||||||
{
|
|
||||||
final NpcTemplate template = NpcTable.getInstance().getTemplate(_player.getPoly().getPolyId());
|
|
||||||
if (template != null)
|
|
||||||
{
|
|
||||||
writeC(0x16);
|
|
||||||
writeD(_player.getObjectId());
|
|
||||||
writeD(_player.getPoly().getPolyId() + 1000000); // npctype id
|
|
||||||
writeD(_player.getKarma() > 0 ? 1 : 0);
|
|
||||||
writeD(_x);
|
|
||||||
writeD(_y);
|
|
||||||
writeD(_z);
|
|
||||||
writeD(_heading);
|
|
||||||
writeD(0x00);
|
|
||||||
writeD(_mAtkSpd);
|
|
||||||
writeD(_pAtkSpd);
|
|
||||||
writeD(_runSpd); // base run speed
|
|
||||||
writeD(_walkSpd); // base walk speed
|
|
||||||
writeD(_runSpd); // swim run speed (calculated by getter)
|
|
||||||
writeD(_walkSpd); // swim walk speed (calculated by getter)
|
|
||||||
writeD(_flyRunSpd); // fly run speed ?
|
|
||||||
writeD(_flyWalkSpd); // fly walk speed ?
|
|
||||||
writeD(_flyRunSpd);
|
|
||||||
writeD(_flyWalkSpd);
|
|
||||||
writeF(_moveMultiplier);
|
|
||||||
writeF(_attackSpeedMultiplier);
|
|
||||||
writeF(template.getCollisionRadius());
|
|
||||||
writeF(template.getCollisionHeight());
|
|
||||||
writeD(_inventory.getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); // right hand weapon
|
|
||||||
writeD(0);
|
|
||||||
writeD(_inventory.getPaperdollItemId(Inventory.PAPERDOLL_LHAND)); // left hand weapon
|
|
||||||
writeC(1); // name above char 1=true ... ??
|
|
||||||
writeC(_player.isRunning() ? 1 : 0);
|
|
||||||
writeC(_player.isInCombat() ? 1 : 0);
|
|
||||||
writeC(_player.isAlikeDead() ? 1 : 0);
|
|
||||||
|
|
||||||
// if(gmSeeInvis)
|
|
||||||
// {
|
|
||||||
writeC(0); // if the charinfo is written means receiver can see the char
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// writeC(_player.getAppearance().getInvisible() ? 1 : 0); // invisible ?? 0=false 1=true 2=summoned (only works if model has a summon animation)
|
|
||||||
// }
|
|
||||||
writeS(_player.getName());
|
|
||||||
|
|
||||||
if (_player.getAppearance().isInvisible())
|
|
||||||
{
|
|
||||||
writeS("Invisible");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
writeS(_player.getTitle());
|
|
||||||
}
|
|
||||||
|
|
||||||
writeD(0);
|
|
||||||
writeD(0);
|
|
||||||
writeD(0); // hmm karma ??
|
|
||||||
|
|
||||||
if (_player.getAppearance().isInvisible())
|
|
||||||
{
|
|
||||||
writeD((_player.getAbnormalEffect() | Creature.ABNORMAL_EFFECT_STEALTH));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
writeD(_player.getAbnormalEffect()); // C2
|
|
||||||
}
|
|
||||||
|
|
||||||
writeD(0); // C2
|
|
||||||
writeD(0); // C2
|
|
||||||
writeD(0); // C2
|
|
||||||
writeD(0); // C2
|
|
||||||
writeC(0); // C2
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LOGGER.warning("Character " + _player.getName() + " (" + _player.getObjectId() + ") morphed in a Npc (" + _player.getPoly().getPolyId() + ") w/o template.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
writeC(0x03);
|
writeC(0x03);
|
||||||
writeD(_x);
|
writeD(_player.getX());
|
||||||
writeD(_y);
|
writeD(_player.getY());
|
||||||
writeD(_z);
|
writeD(_player.getZ());
|
||||||
writeD(_player.getBoat() != null ? _player.getBoat().getObjectId() : 0);
|
writeD(_player.getBoat() != null ? _player.getBoat().getObjectId() : 0);
|
||||||
writeD(_player.getObjectId());
|
writeD(_player.getObjectId());
|
||||||
writeS(_player.getName());
|
writeS(_player.getName());
|
||||||
@ -193,8 +90,8 @@ public class CharInfo extends GameServerPacket
|
|||||||
writeD(_player.getPvpFlag());
|
writeD(_player.getPvpFlag());
|
||||||
writeD(_player.getKarma());
|
writeD(_player.getKarma());
|
||||||
|
|
||||||
writeD(_mAtkSpd);
|
writeD(_player.getMAtkSpd());
|
||||||
writeD(_pAtkSpd);
|
writeD(_player.getPAtkSpd());
|
||||||
|
|
||||||
writeD(_player.getPvpFlag());
|
writeD(_player.getPvpFlag());
|
||||||
writeD(_player.getKarma());
|
writeD(_player.getKarma());
|
||||||
@ -208,7 +105,7 @@ public class CharInfo extends GameServerPacket
|
|||||||
writeD(_flyRunSpd);
|
writeD(_flyRunSpd);
|
||||||
writeD(_flyWalkSpd);
|
writeD(_flyWalkSpd);
|
||||||
writeF(_moveMultiplier);
|
writeF(_moveMultiplier);
|
||||||
writeF(_attackSpeedMultiplier);
|
writeF(_player.getAttackSpeedMultiplier());
|
||||||
writeF(_player.getBaseTemplate().getCollisionRadius());
|
writeF(_player.getBaseTemplate().getCollisionRadius());
|
||||||
writeF(_player.getBaseTemplate().getCollisionHeight());
|
writeF(_player.getBaseTemplate().getCollisionHeight());
|
||||||
|
|
||||||
@ -298,5 +195,4 @@ public class CharInfo extends GameServerPacket
|
|||||||
|
|
||||||
writeD(_player.getAppearance().getNameColor());
|
writeD(_player.getAppearance().getNameColor());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -61,9 +61,6 @@ public class NpcInfo extends GameServerPacket
|
|||||||
*/
|
*/
|
||||||
public NpcInfo(NpcInstance cha, Creature attacker)
|
public NpcInfo(NpcInstance cha, Creature attacker)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* if(cha.getMxcPoly() != null) { attacker.sendPacket(new MxCPolyInfo(cha)); return; }
|
|
||||||
*/
|
|
||||||
if (cha.getCustomNpcInstance() != null)
|
if (cha.getCustomNpcInstance() != null)
|
||||||
{
|
{
|
||||||
attacker.sendPacket(new CustomNpcInfo(cha));
|
attacker.sendPacket(new CustomNpcInfo(cha));
|
||||||
|
@ -1,175 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the L2J Mobius project.
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package org.l2jmobius.gameserver.network.serverpackets;
|
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
|
||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
|
||||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @version $Revision: 1.7.2.4.2.9 $ $Date: 2005/04/11 10:05:54 $
|
|
||||||
*/
|
|
||||||
public class NpcInfoPoly extends GameServerPacket
|
|
||||||
{
|
|
||||||
private Creature _creature;
|
|
||||||
private final WorldObject _obj;
|
|
||||||
private int _x;
|
|
||||||
private int _y;
|
|
||||||
private int _z;
|
|
||||||
private int _heading;
|
|
||||||
private final int _npcId;
|
|
||||||
private boolean _isAttackable;
|
|
||||||
private final boolean _isSummoned;
|
|
||||||
private boolean _isRunning;
|
|
||||||
private boolean _isInCombat;
|
|
||||||
private boolean _isAlikeDead;
|
|
||||||
private int _mAtkSpd;
|
|
||||||
private int _pAtkSpd;
|
|
||||||
private int _runSpd;
|
|
||||||
private int _walkSpd;
|
|
||||||
private int _swimRunSpd;
|
|
||||||
private int _swimWalkSpd;
|
|
||||||
private int _flRunSpd;
|
|
||||||
private int _flWalkSpd;
|
|
||||||
private int _flyRunSpd;
|
|
||||||
private int _flyWalkSpd;
|
|
||||||
private int _rhand;
|
|
||||||
private int _lhand;
|
|
||||||
private String _name;
|
|
||||||
private String _title;
|
|
||||||
private int _abnormalEffect;
|
|
||||||
NpcTemplate _template;
|
|
||||||
private final int _collisionRadius;
|
|
||||||
private final int _collisionHeight;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Instantiates a new npc info poly.
|
|
||||||
* @param obj the obj
|
|
||||||
* @param attacker the attacker
|
|
||||||
*/
|
|
||||||
public NpcInfoPoly(WorldObject obj, Creature attacker)
|
|
||||||
{
|
|
||||||
_obj = obj;
|
|
||||||
_npcId = obj.getPoly().getPolyId();
|
|
||||||
_template = NpcTable.getInstance().getTemplate(_npcId);
|
|
||||||
_isAttackable = true;
|
|
||||||
_rhand = 0;
|
|
||||||
_lhand = 0;
|
|
||||||
_isSummoned = false;
|
|
||||||
_collisionRadius = _template.getCollisionRadius();
|
|
||||||
_collisionHeight = _template.getCollisionHeight();
|
|
||||||
if (_obj instanceof Creature)
|
|
||||||
{
|
|
||||||
_creature = (Creature) obj;
|
|
||||||
_isAttackable = obj.isAutoAttackable(attacker);
|
|
||||||
_rhand = _template.getRhand();
|
|
||||||
_lhand = _template.getLhand();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_obj instanceof ItemInstance)
|
|
||||||
{
|
|
||||||
_x = _obj.getX();
|
|
||||||
_y = _obj.getY();
|
|
||||||
_z = _obj.getZ();
|
|
||||||
_heading = 0;
|
|
||||||
_mAtkSpd = 100; // yes, an item can be dread as death
|
|
||||||
_pAtkSpd = 100;
|
|
||||||
_runSpd = 120;
|
|
||||||
_walkSpd = 80;
|
|
||||||
_swimRunSpd = _flRunSpd = _flyRunSpd = _runSpd;
|
|
||||||
_swimWalkSpd = _flWalkSpd = _flyWalkSpd = _walkSpd;
|
|
||||||
_isRunning = _isInCombat = _isAlikeDead = false;
|
|
||||||
_name = "item";
|
|
||||||
_title = "polymorphed";
|
|
||||||
_abnormalEffect = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_x = _creature.getX();
|
|
||||||
_y = _creature.getY();
|
|
||||||
_z = _creature.getZ();
|
|
||||||
_heading = _creature.getHeading();
|
|
||||||
_mAtkSpd = _creature.getMAtkSpd();
|
|
||||||
_pAtkSpd = _creature.getPAtkSpd();
|
|
||||||
_runSpd = _creature.getRunSpeed();
|
|
||||||
_walkSpd = _creature.getWalkSpeed();
|
|
||||||
_swimRunSpd = _flRunSpd = _flyRunSpd = _runSpd;
|
|
||||||
_swimWalkSpd = _flWalkSpd = _flyWalkSpd = _walkSpd;
|
|
||||||
_isRunning = _creature.isRunning();
|
|
||||||
_isInCombat = _creature.isInCombat();
|
|
||||||
_isAlikeDead = _creature.isAlikeDead();
|
|
||||||
_name = _creature.getName();
|
|
||||||
_title = _creature.getTitle();
|
|
||||||
_abnormalEffect = _creature.getAbnormalEffect();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see org.l2jmobius.gameserver.network.serverpackets.L2GameServerPacket#writeImpl()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
protected final void writeImpl()
|
|
||||||
{
|
|
||||||
writeC(0x16);
|
|
||||||
writeD(_obj.getObjectId());
|
|
||||||
writeD(_npcId + 1000000); // npctype id
|
|
||||||
writeD(_isAttackable ? 1 : 0);
|
|
||||||
writeD(_x);
|
|
||||||
writeD(_y);
|
|
||||||
writeD(_z);
|
|
||||||
writeD(_heading);
|
|
||||||
writeD(0x00);
|
|
||||||
writeD(_mAtkSpd);
|
|
||||||
writeD(_pAtkSpd);
|
|
||||||
writeD(_runSpd);
|
|
||||||
writeD(_walkSpd);
|
|
||||||
writeD(_swimRunSpd/* 0x32 */); // swimspeed
|
|
||||||
writeD(_swimWalkSpd/* 0x32 */); // swimspeed
|
|
||||||
writeD(_flRunSpd);
|
|
||||||
writeD(_flWalkSpd);
|
|
||||||
writeD(_flyRunSpd);
|
|
||||||
writeD(_flyWalkSpd);
|
|
||||||
writeF(1/* _activeChar.getProperMultiplier() */);
|
|
||||||
writeF(1/* _activeChar.getAttackSpeedMultiplier() */);
|
|
||||||
writeF(_collisionRadius);
|
|
||||||
writeF(_collisionHeight);
|
|
||||||
writeD(_rhand); // right hand weapon
|
|
||||||
writeD(0);
|
|
||||||
writeD(_lhand); // left hand weapon
|
|
||||||
writeC(1); // name above char 1=true ... ??
|
|
||||||
writeC(_isRunning ? 1 : 0);
|
|
||||||
writeC(_isInCombat ? 1 : 0);
|
|
||||||
writeC(_isAlikeDead ? 1 : 0);
|
|
||||||
writeC(_isSummoned ? 2 : 0); // invisible ?? 0=false 1=true 2=summoned (only works if model has a summon animation)
|
|
||||||
writeS(_name);
|
|
||||||
writeS(_title);
|
|
||||||
writeD(0);
|
|
||||||
writeD(0);
|
|
||||||
writeD(0000); // hmm karma ??
|
|
||||||
|
|
||||||
writeH(_abnormalEffect); // C2
|
|
||||||
writeH(0x00); // C2
|
|
||||||
writeD(0000); // C2
|
|
||||||
writeD(0000); // C2
|
|
||||||
writeD(0000); // C2
|
|
||||||
writeD(0000); // C2
|
|
||||||
writeC(0000); // C2
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,76 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the L2J Mobius project.
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package org.l2jmobius.gameserver.network.serverpackets;
|
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 15 ee cc 11 43 object id 39 00 00 00 item id 8f 14 00 00 x b7 f1 00 00 y 60 f2 ff ff z 01 00 00 00 show item count 7a 00 00 00 count . format dddddddd
|
|
||||||
* @version $Revision: 1.3.2.1.2.3 $ $Date: 2005/03/27 15:29:39 $
|
|
||||||
*/
|
|
||||||
public class SpawnItemPoly extends GameServerPacket
|
|
||||||
{
|
|
||||||
private int _objectId;
|
|
||||||
private int _itemId;
|
|
||||||
private int _x;
|
|
||||||
private int _y;
|
|
||||||
private int _z;
|
|
||||||
private int _stackable;
|
|
||||||
private int _count;
|
|
||||||
|
|
||||||
public SpawnItemPoly(WorldObject object)
|
|
||||||
{
|
|
||||||
if (object instanceof ItemInstance)
|
|
||||||
{
|
|
||||||
final ItemInstance item = (ItemInstance) object;
|
|
||||||
_objectId = object.getObjectId();
|
|
||||||
_itemId = object.getPoly().getPolyId();
|
|
||||||
_x = item.getX();
|
|
||||||
_y = item.getY();
|
|
||||||
_z = item.getZ();
|
|
||||||
_stackable = item.isStackable() ? 0x01 : 0x00;
|
|
||||||
_count = item.getCount();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_objectId = object.getObjectId();
|
|
||||||
_itemId = object.getPoly().getPolyId();
|
|
||||||
_x = object.getX();
|
|
||||||
_y = object.getY();
|
|
||||||
_z = object.getZ();
|
|
||||||
_stackable = 0x00;
|
|
||||||
_count = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected final void writeImpl()
|
|
||||||
{
|
|
||||||
writeC(0x0b);
|
|
||||||
writeD(_objectId);
|
|
||||||
writeD(_itemId);
|
|
||||||
|
|
||||||
writeD(_x);
|
|
||||||
writeD(_y);
|
|
||||||
writeD(_z);
|
|
||||||
// only show item count if it is a stackable item
|
|
||||||
writeD(_stackable);
|
|
||||||
writeD(_count);
|
|
||||||
writeD(0x00); // c2
|
|
||||||
}
|
|
||||||
}
|
|
@ -17,11 +17,9 @@
|
|||||||
package org.l2jmobius.gameserver.network.serverpackets;
|
package org.l2jmobius.gameserver.network.serverpackets;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
|
||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
|
||||||
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||||
|
|
||||||
public class UserInfo extends GameServerPacket
|
public class UserInfo extends GameServerPacket
|
||||||
@ -180,14 +178,6 @@ public class UserInfo extends GameServerPacket
|
|||||||
{
|
{
|
||||||
title = "[Invisible]";
|
title = "[Invisible]";
|
||||||
}
|
}
|
||||||
if (_player.getPoly().isMorphed())
|
|
||||||
{
|
|
||||||
final NpcTemplate polyObj = NpcTable.getInstance().getTemplate(_player.getPoly().getPolyId());
|
|
||||||
if (polyObj != null)
|
|
||||||
{
|
|
||||||
title += " - " + polyObj.getName();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
writeS(title);
|
writeS(title);
|
||||||
|
|
||||||
writeD(_player.getClanId());
|
writeD(_player.getClanId());
|
||||||
|
@ -225,10 +225,6 @@
|
|||||||
<admin command="admin_para_all_menu" accessLevel="80" />
|
<admin command="admin_para_all_menu" accessLevel="80" />
|
||||||
<admin command="admin_unpara_menu" accessLevel="80" />
|
<admin command="admin_unpara_menu" accessLevel="80" />
|
||||||
<admin command="admin_para_menu" accessLevel="80" />
|
<admin command="admin_para_menu" accessLevel="80" />
|
||||||
<admin command="admin_polyself" accessLevel="80" />
|
|
||||||
<admin command="admin_unpolyself" accessLevel="80" />
|
|
||||||
<admin command="admin_polyself_menu" accessLevel="80" />
|
|
||||||
<admin command="admin_unpolyself_menu" accessLevel="80" />
|
|
||||||
<admin command="admin_clearteams" accessLevel="80" />
|
<admin command="admin_clearteams" accessLevel="80" />
|
||||||
<admin command="admin_setteam_close" accessLevel="80" /> <!-- set all Gm close players to val team -->
|
<admin command="admin_setteam_close" accessLevel="80" /> <!-- set all Gm close players to val team -->
|
||||||
<admin command="admin_setteam" accessLevel="80" />
|
<admin command="admin_setteam" accessLevel="80" />
|
||||||
@ -282,8 +278,6 @@
|
|||||||
<admin command="admin_event_name" accessLevel="80" />
|
<admin command="admin_event_name" accessLevel="80" />
|
||||||
<admin command="admin_event_control_kill" accessLevel="80" />
|
<admin command="admin_event_control_kill" accessLevel="80" />
|
||||||
<admin command="admin_event_control_res" accessLevel="80" />
|
<admin command="admin_event_control_res" accessLevel="80" />
|
||||||
<admin command="admin_event_control_poly" accessLevel="80" />
|
|
||||||
<admin command="admin_event_control_unpoly" accessLevel="80" />
|
|
||||||
<admin command="admin_event_control_prize" accessLevel="80" />
|
<admin command="admin_event_control_prize" accessLevel="80" />
|
||||||
<admin command="admin_event_control_chatban" accessLevel="80" />
|
<admin command="admin_event_control_chatban" accessLevel="80" />
|
||||||
<admin command="admin_event_control_finish" accessLevel="80" />
|
<admin command="admin_event_control_finish" accessLevel="80" />
|
||||||
@ -435,12 +429,6 @@
|
|||||||
<!-- Section: Pledge -->
|
<!-- Section: Pledge -->
|
||||||
<admin command="admin_pledge" accessLevel="90" /> <!-- Manage Clan -->
|
<admin command="admin_pledge" accessLevel="90" /> <!-- Manage Clan -->
|
||||||
|
|
||||||
<!-- Section: Polymorph -->
|
|
||||||
<admin command="admin_polymorph" accessLevel="90" />
|
|
||||||
<admin command="admin_unpolymorph" accessLevel="90" />
|
|
||||||
<admin command="admin_polymorph_menu" accessLevel="90" />
|
|
||||||
<admin command="admin_unpolymorph_menu" accessLevel="90" />
|
|
||||||
|
|
||||||
<!-- Section: Quest -->
|
<!-- Section: Quest -->
|
||||||
<admin command="admin_quest_reload" accessLevel="90" />
|
<admin command="admin_quest_reload" accessLevel="90" />
|
||||||
|
|
||||||
|
@ -11,12 +11,8 @@
|
|||||||
<td><edit var="menu_command" width=120 height=15></td>
|
<td><edit var="menu_command" width=120 height=15></td>
|
||||||
<td><button value="Help" action="bypass -h admin_help help/effects_menu.htm" width=45 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
<td><button value="Help" action="bypass -h admin_help help/effects_menu.htm" width=45 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
||||||
</tr></table><br>
|
</tr></table><br>
|
||||||
<font color="aadd77">Trasformations</font><table width=240><tr>
|
<font color="aadd77">Effects</font><table width=240>
|
||||||
<td><button value="PolyMorph" action="bypass -h admin_polymorph_menu $menu_command" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
<tr>
|
||||||
<td><button value="UnPoly" action="bypass -h admin_unpolymorph_menu" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
|
||||||
<td><button value="PolySelf" action="bypass -h admin_polyself_menu $menu_command" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
|
||||||
<td><button value="UnPolySlf" action="bypass -h admin_unpolyself_menu" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
|
||||||
</tr><tr>
|
|
||||||
<td><button value="Para" action="bypass -h admin_para_menu $menu_command" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
<td><button value="Para" action="bypass -h admin_para_menu $menu_command" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
||||||
<td><button value="UnPara" action="bypass -h admin_unpara_menu $menu_command" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
<td><button value="UnPara" action="bypass -h admin_unpara_menu $menu_command" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
||||||
<td><button value="ParaAll" action="bypass -h admin_para_all_menu" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
<td><button value="ParaAll" action="bypass -h admin_para_all_menu" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td>
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
3-Effect Panel Buttons<br></font>
|
3-Effect Panel Buttons<br></font>
|
||||||
L2 special effects are here: earthquakes, sky changes, weird character and mob animations.<br>
|
L2 special effects are here: earthquakes, sky changes, weird character and mob animations.<br>
|
||||||
<font color="LEVEL">3-1 First pack of effects.<br>
|
<font color="LEVEL">3-1 First pack of effects.<br>
|
||||||
PolyMorph:</font> Make your target (player) look like the specified mob.<br>
|
|
||||||
<font color="LEVEL">Unpoly:</font> Cancel polymorph effects that specified target may have.<br>
|
|
||||||
<font color="LEVEL">PolySelf:</font> Polymorph yourself to specified npcId, you will see a title change only.<br>
|
|
||||||
<font color="LEVEL">UnPolySelf:</font> Cancel any polymorph effect you could have.<br>
|
|
||||||
<font color="LEVEL">Para:</font> Paralyze character (target/name).<br>
|
<font color="LEVEL">Para:</font> Paralyze character (target/name).<br>
|
||||||
<font color="LEVEL">UnPara:</font> Cancel Paralysis effect (target/name).<br>
|
<font color="LEVEL">UnPara:</font> Cancel Paralysis effect (target/name).<br>
|
||||||
<font color="LEVEL">ParaAll:</font> Paralyze any character in the world, but yours. Use wisely, annoys people and causes lag.<br>
|
<font color="LEVEL">ParaAll:</font> Paralyze any character in the world, but yours. Use wisely, annoys people and causes lag.<br>
|
||||||
|
@ -52,10 +52,5 @@
|
|||||||
<font color="LEVEL">//setew value</font> - Sets enchantment of target player currently equipped weapon to value<br><font color="FF9933">Usage: //setew 9999</font><br>
|
<font color="LEVEL">//setew value</font> - Sets enchantment of target player currently equipped weapon to value<br><font color="FF9933">Usage: //setew 9999</font><br>
|
||||||
<font color="LEVEL">//banchat</font> - Mutes a player<br><font color="FF9933">Usage: //banchat kadar </font><br>
|
<font color="LEVEL">//banchat</font> - Mutes a player<br><font color="FF9933">Usage: //banchat kadar </font><br>
|
||||||
<font color="LEVEL">//unbanchat</font> - Unmutes a player<br><font color="FF9933">Usage: //unbanchat kadar </font><br>
|
<font color="LEVEL">//unbanchat</font> - Unmutes a player<br><font color="FF9933">Usage: //unbanchat kadar </font><br>
|
||||||
<font color="LEVEL">//polymorph character npc id </font><br>
|
|
||||||
<font color="LEVEL">//polymorph item id to poly target into id|</font><br>
|
|
||||||
<font color="LEVEL">//polyself <npc id></font> - Used to polymorph yourself into a mob<br>
|
|
||||||
<font color="LEVEL">//unpolyself</font> - Returns you to the normal state<br>
|
|
||||||
<font color="LEVEL">//polymorph item <itemid></font> - Polymorphs an item<br>
|
|
||||||
<center><button value="Index" action="bypass -h admin_help admhelp.htm" width=60 height=15 back="sek.cbui94" fore="sek.cbui92"></center>
|
<center><button value="Index" action="bypass -h admin_help admhelp.htm" width=60 height=15 back="sek.cbui94" fore="sek.cbui92"></center>
|
||||||
</body></html>
|
</body></html>
|
@ -68,7 +68,6 @@ import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminOnline;
|
|||||||
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminPForge;
|
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminPForge;
|
||||||
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminPetition;
|
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminPetition;
|
||||||
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminPledge;
|
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminPledge;
|
||||||
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminPolymorph;
|
|
||||||
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminQuest;
|
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminQuest;
|
||||||
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminReload;
|
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminReload;
|
||||||
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminRepairChar;
|
import org.l2jmobius.gameserver.handler.admincommandhandlers.AdminRepairChar;
|
||||||
@ -149,7 +148,6 @@ public class AdminCommandHandler
|
|||||||
registerAdminCommandHandler(new AdminPetition());
|
registerAdminCommandHandler(new AdminPetition());
|
||||||
registerAdminCommandHandler(new AdminPForge());
|
registerAdminCommandHandler(new AdminPForge());
|
||||||
registerAdminCommandHandler(new AdminPledge());
|
registerAdminCommandHandler(new AdminPledge());
|
||||||
registerAdminCommandHandler(new AdminPolymorph());
|
|
||||||
registerAdminCommandHandler(new AdminQuest());
|
registerAdminCommandHandler(new AdminQuest());
|
||||||
registerAdminCommandHandler(new AdminReload());
|
registerAdminCommandHandler(new AdminReload());
|
||||||
registerAdminCommandHandler(new AdminRepairChar());
|
registerAdminCommandHandler(new AdminRepairChar());
|
||||||
|
@ -27,7 +27,6 @@ import org.l2jmobius.gameserver.model.actor.instance.ChestInstance;
|
|||||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CharInfo;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Earthquake;
|
import org.l2jmobius.gameserver.network.serverpackets.Earthquake;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ExRedSky;
|
import org.l2jmobius.gameserver.network.serverpackets.ExRedSky;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.GameServerPacket;
|
import org.l2jmobius.gameserver.network.serverpackets.GameServerPacket;
|
||||||
@ -38,7 +37,6 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.StopMove;
|
import org.l2jmobius.gameserver.network.serverpackets.StopMove;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SunRise;
|
import org.l2jmobius.gameserver.network.serverpackets.SunRise;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SunSet;
|
import org.l2jmobius.gameserver.network.serverpackets.SunSet;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
import org.l2jmobius.gameserver.util.BuilderUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -49,7 +47,6 @@ import org.l2jmobius.gameserver.util.BuilderUtil;
|
|||||||
* <li>gmspeed = temporary Super Haste effect.
|
* <li>gmspeed = temporary Super Haste effect.
|
||||||
* <li>para/unpara = paralyze/remove paralysis from target
|
* <li>para/unpara = paralyze/remove paralysis from target
|
||||||
* <li>para_all/unpara_all = same as para/unpara, affects the whole world.
|
* <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>changename = temporary change name
|
||||||
* <li>clearteams/setteam_close/setteam = team related commands
|
* <li>clearteams/setteam_close/setteam = team related commands
|
||||||
* <li>social = forces an Creature instance to broadcast social action packets.
|
* <li>social = forces an Creature instance to broadcast social action packets.
|
||||||
@ -80,10 +77,6 @@ public class AdminEffects implements IAdminCommandHandler
|
|||||||
"admin_para_all_menu",
|
"admin_para_all_menu",
|
||||||
"admin_unpara_menu",
|
"admin_unpara_menu",
|
||||||
"admin_para_menu",
|
"admin_para_menu",
|
||||||
"admin_polyself",
|
|
||||||
"admin_unpolyself",
|
|
||||||
"admin_polyself_menu",
|
|
||||||
"admin_unpolyself_menu",
|
|
||||||
"admin_clearteams",
|
"admin_clearteams",
|
||||||
"admin_setteam_close",
|
"admin_setteam_close",
|
||||||
"admin_setteam",
|
"admin_setteam",
|
||||||
@ -333,34 +326,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.getX(), activeChar.getY(), activeChar.getZ(), false);
|
|
||||||
activeChar.broadcastPacket(new CharInfo(activeChar));
|
|
||||||
activeChar.sendPacket(new UserInfo(activeChar));
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (command.startsWith("admin_unpolyself"))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
activeChar.getPoly().setPolyInfo(null, "1");
|
|
||||||
activeChar.decayMe();
|
|
||||||
activeChar.spawnMe(activeChar.getX(), activeChar.getY(), activeChar.getZ());
|
|
||||||
activeChar.broadcastPacket(new CharInfo(activeChar));
|
|
||||||
activeChar.sendPacket(new UserInfo(activeChar));
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (command.equals("admin_clear_teams"))
|
else if (command.equals("admin_clear_teams"))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -36,13 +36,11 @@ import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
|||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.entity.event.GameEvent;
|
import org.l2jmobius.gameserver.model.entity.event.GameEvent;
|
||||||
import org.l2jmobius.gameserver.model.spawn.Spawn;
|
import org.l2jmobius.gameserver.model.spawn.Spawn;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.CharInfo;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ItemList;
|
import org.l2jmobius.gameserver.network.serverpackets.ItemList;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.Revive;
|
import org.l2jmobius.gameserver.network.serverpackets.Revive;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class handles following admin commands: - admin = shows menu
|
* This class handles following admin commands: - admin = shows menu
|
||||||
@ -70,8 +68,6 @@ public class AdminEventEngine implements IAdminCommandHandler
|
|||||||
"admin_event_name",
|
"admin_event_name",
|
||||||
"admin_event_control_kill",
|
"admin_event_control_kill",
|
||||||
"admin_event_control_res",
|
"admin_event_control_res",
|
||||||
"admin_event_control_poly",
|
|
||||||
"admin_event_control_unpoly",
|
|
||||||
"admin_event_control_prize",
|
"admin_event_control_prize",
|
||||||
"admin_event_control_chatban",
|
"admin_event_control_chatban",
|
||||||
"admin_event_control_finish"
|
"admin_event_control_finish"
|
||||||
@ -340,30 +336,6 @@ public class AdminEventEngine implements IAdminCommandHandler
|
|||||||
|
|
||||||
showEventControl(activeChar);
|
showEventControl(activeChar);
|
||||||
}
|
}
|
||||||
else if (command.startsWith("admin_event_control_poly"))
|
|
||||||
{
|
|
||||||
final StringTokenizer st0 = new StringTokenizer(command.substring(25));
|
|
||||||
final StringTokenizer st = new StringTokenizer(st0.nextToken(), "-");
|
|
||||||
final String id = st0.nextToken();
|
|
||||||
|
|
||||||
while (st.hasMoreElements())
|
|
||||||
{
|
|
||||||
polyTeam(Integer.parseInt(st.nextToken()), id);
|
|
||||||
}
|
|
||||||
|
|
||||||
showEventControl(activeChar);
|
|
||||||
}
|
|
||||||
else if (command.startsWith("admin_event_control_unpoly"))
|
|
||||||
{
|
|
||||||
final StringTokenizer st = new StringTokenizer(command.substring(27), "-");
|
|
||||||
|
|
||||||
while (st.hasMoreElements())
|
|
||||||
{
|
|
||||||
unpolyTeam(Integer.parseInt(st.nextToken()));
|
|
||||||
}
|
|
||||||
|
|
||||||
showEventControl(activeChar);
|
|
||||||
}
|
|
||||||
else if (command.startsWith("admin_event_control_prize"))
|
else if (command.startsWith("admin_event_control_prize"))
|
||||||
{
|
{
|
||||||
final StringTokenizer st0 = new StringTokenizer(command.substring(26));
|
final StringTokenizer st0 = new StringTokenizer(command.substring(26));
|
||||||
@ -599,11 +571,6 @@ public class AdminEventEngine implements IAdminCommandHandler
|
|||||||
replyMSG.append("<tr><td> </td></tr>");
|
replyMSG.append("<tr><td> </td></tr>");
|
||||||
replyMSG.append("<tr><td><button value=\"Resurrect\" action=\"bypass -h admin_event_control_res $team_number\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><font color=\"LEVEL\">Resurrect Team's members</font></td></tr>");
|
replyMSG.append("<tr><td><button value=\"Resurrect\" action=\"bypass -h admin_event_control_res $team_number\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><font color=\"LEVEL\">Resurrect Team's members</font></td></tr>");
|
||||||
replyMSG.append("<tr><td> </td></tr>");
|
replyMSG.append("<tr><td> </td></tr>");
|
||||||
replyMSG.append("<tr><td><button value=\"Polymorph\" action=\"bypass -h admin_event_control_poly $team_number $poly_id\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><edit var=\"poly_id\" width=100 height=15><font color=\"LEVEL\">Polymorphs the team into the NPC with the id specified</font></td></tr>");
|
|
||||||
replyMSG.append("<tr><td> </td></tr>");
|
|
||||||
replyMSG.append("<tr><td><button value=\"UnPolymorph\" action=\"bypass -h admin_event_control_unpoly $team_number\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><font color=\"LEVEL\">Unpolymorph the team</font></td></tr>");
|
|
||||||
replyMSG.append("<tr><td> </td></tr>");
|
|
||||||
replyMSG.append("<tr><td> </td></tr>");
|
|
||||||
replyMSG.append("<tr><td><button value=\"Give Item\" action=\"bypass -h admin_event_control_prize $team_number $n $id\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"> number <edit var=\"n\" width=100 height=15> item id <edit var=\"id\" width=100 height=15></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>");
|
replyMSG.append("<tr><td><button value=\"Give Item\" action=\"bypass -h admin_event_control_prize $team_number $n $id\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"> number <edit var=\"n\" width=100 height=15> item id <edit var=\"id\" width=100 height=15></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>");
|
||||||
replyMSG.append("<tr><td> </td></tr>");
|
replyMSG.append("<tr><td> </td></tr>");
|
||||||
replyMSG.append("<tr><td><button value=\"End\" action=\"bypass -h admin_event_control_finish\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><font color=\"LEVEL\">Will finish the event teleporting back all the players</font></td></tr>");
|
replyMSG.append("<tr><td><button value=\"End\" action=\"bypass -h admin_event_control_finish\" width=90 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td><font color=\"LEVEL\">Will finish the event teleporting back all the players</font></td></tr>");
|
||||||
@ -763,49 +730,6 @@ public class AdminEventEngine implements IAdminCommandHandler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void polyTeam(int team, String id)
|
|
||||||
{
|
|
||||||
final LinkedList<String> linked = GameEvent.players.get(team);
|
|
||||||
final Iterator<String> it = linked.iterator();
|
|
||||||
|
|
||||||
while (it.hasNext())
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
final PlayerInstance target = World.getInstance().getPlayer(it.next());
|
|
||||||
target.getPoly().setPolyInfo("npc", id);
|
|
||||||
target.teleToLocation(target.getX(), target.getY(), target.getZ(), true);
|
|
||||||
target.broadcastPacket(new CharInfo(target));
|
|
||||||
target.sendPacket(new UserInfo(target));
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void unpolyTeam(int team)
|
|
||||||
{
|
|
||||||
final LinkedList<String> linked = GameEvent.players.get(team);
|
|
||||||
final Iterator<String> it = linked.iterator();
|
|
||||||
|
|
||||||
while (it.hasNext())
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
final PlayerInstance target = World.getInstance().getPlayer(it.next());
|
|
||||||
target.getPoly().setPolyInfo(null, "1");
|
|
||||||
target.decayMe();
|
|
||||||
target.spawnMe(target.getX(), target.getY(), target.getZ());
|
|
||||||
target.broadcastPacket(new CharInfo(target));
|
|
||||||
target.sendPacket(new UserInfo(target));
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createItem(PlayerInstance activeChar, PlayerInstance player, int id, int num)
|
private void createItem(PlayerInstance activeChar, PlayerInstance player, int id, int num)
|
||||||
{
|
{
|
||||||
player.getInventory().addItem("Event", id, num, player, activeChar);
|
player.getInventory().addItem("Event", id, num, player, activeChar);
|
||||||
@ -855,7 +779,6 @@ public class AdminEventEngine implements IAdminCommandHandler
|
|||||||
void telePlayersBack(int team)
|
void telePlayersBack(int team)
|
||||||
{
|
{
|
||||||
resTeam(team);
|
resTeam(team);
|
||||||
unpolyTeam(team);
|
|
||||||
|
|
||||||
final LinkedList<String> linked = GameEvent.players.get(team);
|
final LinkedList<String> linked = GameEvent.players.get(team);
|
||||||
final Iterator<String> it = linked.iterator();
|
final Iterator<String> it = linked.iterator();
|
||||||
|
@ -1,135 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the L2J Mobius project.
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package org.l2jmobius.gameserver.handler.admincommandhandlers;
|
|
||||||
|
|
||||||
import java.util.StringTokenizer;
|
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
|
||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
|
||||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SetupGauge;
|
|
||||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This class handles following admin commands: polymorph
|
|
||||||
* @version $Revision: 1.2.2.1.2.4 $ $Date: 2007/07/31 10:05:56 $
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class AdminPolymorph implements IAdminCommandHandler
|
|
||||||
{
|
|
||||||
private static final String[] ADMIN_COMMANDS =
|
|
||||||
{
|
|
||||||
"admin_polymorph",
|
|
||||||
"admin_unpolymorph",
|
|
||||||
"admin_polymorph_menu",
|
|
||||||
"admin_unpolymorph_menu"
|
|
||||||
};
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean useAdminCommand(String command, PlayerInstance activeChar)
|
|
||||||
{
|
|
||||||
if (command.startsWith("admin_polymorph"))
|
|
||||||
{
|
|
||||||
final StringTokenizer st = new StringTokenizer(command);
|
|
||||||
final WorldObject target = activeChar.getTarget();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
st.nextToken();
|
|
||||||
final String p1 = st.nextToken();
|
|
||||||
if (st.hasMoreTokens())
|
|
||||||
{
|
|
||||||
final String p2 = st.nextToken();
|
|
||||||
doPolymorph(activeChar, target, p2, p1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
doPolymorph(activeChar, target, p1, "npc");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Usage: //polymorph [type] <id>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (command.equals("admin_unpolymorph"))
|
|
||||||
{
|
|
||||||
doUnpoly(activeChar, activeChar.getTarget());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (command.contains("menu"))
|
|
||||||
{
|
|
||||||
showMainPage(activeChar);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String[] getAdminCommandList()
|
|
||||||
{
|
|
||||||
return ADMIN_COMMANDS;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void doPolymorph(PlayerInstance activeChar, WorldObject obj, String id, String type)
|
|
||||||
{
|
|
||||||
if (obj != null)
|
|
||||||
{
|
|
||||||
obj.getPoly().setPolyInfo(type, id);
|
|
||||||
|
|
||||||
// animation
|
|
||||||
if (obj instanceof Creature)
|
|
||||||
{
|
|
||||||
final Creature creature = (Creature) obj;
|
|
||||||
creature.broadcastPacket(new MagicSkillUse(creature, creature, 1008, 1, 4000, 0));
|
|
||||||
creature.sendPacket(new SetupGauge(0, 4000));
|
|
||||||
}
|
|
||||||
|
|
||||||
// end of animation
|
|
||||||
obj.decayMe();
|
|
||||||
obj.spawnMe(obj.getX(), obj.getY(), obj.getZ());
|
|
||||||
BuilderUtil.sendSysMessage(activeChar, "Polymorph succeed");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
activeChar.sendPacket(SystemMessageId.INVALID_TARGET);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void doUnpoly(PlayerInstance activeChar, WorldObject 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void showMainPage(PlayerInstance activeChar)
|
|
||||||
{
|
|
||||||
AdminHelpPage.showHelpPage(activeChar, "effects_menu.htm");
|
|
||||||
}
|
|
||||||
}
|
|
@ -25,7 +25,6 @@ import org.l2jmobius.gameserver.instancemanager.MercTicketManager;
|
|||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.knownlist.WorldObjectKnownList;
|
import org.l2jmobius.gameserver.model.actor.knownlist.WorldObjectKnownList;
|
||||||
import org.l2jmobius.gameserver.model.actor.poly.ObjectPoly;
|
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
import org.l2jmobius.gameserver.network.GameClient;
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||||
@ -47,7 +46,6 @@ public abstract class WorldObject
|
|||||||
private WorldObjectKnownList _knownList;
|
private WorldObjectKnownList _knownList;
|
||||||
private String _name;
|
private String _name;
|
||||||
private int _objectId;
|
private int _objectId;
|
||||||
private ObjectPoly _poly;
|
|
||||||
private ObjectPosition _position;
|
private ObjectPosition _position;
|
||||||
|
|
||||||
// Objects can only see objects in same instancezone, instance 0 is normal world -1 the all seeing world
|
// Objects can only see objects in same instancezone, instance 0 is normal world -1 the all seeing world
|
||||||
@ -351,15 +349,6 @@ public abstract class WorldObject
|
|||||||
return _objectId;
|
return _objectId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObjectPoly getPoly()
|
|
||||||
{
|
|
||||||
if (_poly == null)
|
|
||||||
{
|
|
||||||
_poly = new ObjectPoly(this);
|
|
||||||
}
|
|
||||||
return _poly;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ObjectPosition getPosition()
|
public ObjectPosition getPosition()
|
||||||
{
|
{
|
||||||
if (_position == null)
|
if (_position == null)
|
||||||
|
@ -4130,7 +4130,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder
|
|||||||
* In Server->Client packet, each effect is represented by 1 bit of the map (ex : BLEEDING = 0x0001 (bit 1), SLEEP = 0x0080 (bit 8)...). The map is calculated by applying a BINARY OR operation on each effect.<br>
|
* In Server->Client packet, each effect is represented by 1 bit of the map (ex : BLEEDING = 0x0001 (bit 1), SLEEP = 0x0080 (bit 8)...). The map is calculated by applying a BINARY OR operation on each effect.<br>
|
||||||
* <br>
|
* <br>
|
||||||
* <b><u>Example of use</u>:</b><br>
|
* <b><u>Example of use</u>:</b><br>
|
||||||
* <li>Server Packet : CharInfo, NpcInfo, NpcInfoPoly, UserInfo...</li>
|
* <li>Server Packet : CharInfo, NpcInfo, UserInfo...</li>
|
||||||
* @return the abnormal effect
|
* @return the abnormal effect
|
||||||
*/
|
*/
|
||||||
public int getAbnormalEffect()
|
public int getAbnormalEffect()
|
||||||
|
@ -44,7 +44,6 @@ import org.l2jmobius.gameserver.network.serverpackets.PrivateStoreMsgSell;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.RecipeShopMsg;
|
import org.l2jmobius.gameserver.network.serverpackets.RecipeShopMsg;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.RelationChanged;
|
import org.l2jmobius.gameserver.network.serverpackets.RelationChanged;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SpawnItem;
|
import org.l2jmobius.gameserver.network.serverpackets.SpawnItem;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SpawnItemPoly;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.StaticObject;
|
import org.l2jmobius.gameserver.network.serverpackets.StaticObject;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.VehicleInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.VehicleInfo;
|
||||||
|
|
||||||
@ -118,12 +117,6 @@ public class PlayerKnownList extends PlayableKnownList
|
|||||||
// Send packets asynchronously. (Obviously heavier on CPU, but significantly reduces network spikes.)
|
// Send packets asynchronously. (Obviously heavier on CPU, but significantly reduces network spikes.)
|
||||||
// On retail there is a similar, if not greater, delay as well.
|
// On retail there is a similar, if not greater, delay as well.
|
||||||
ThreadPool.schedule(() ->
|
ThreadPool.schedule(() ->
|
||||||
{
|
|
||||||
if (object.getPoly().isMorphed() && object.getPoly().getPolyType().equals("item"))
|
|
||||||
{
|
|
||||||
activeChar.sendPacket(new SpawnItemPoly(object));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if (object.isItem())
|
if (object.isItem())
|
||||||
{
|
{
|
||||||
@ -240,7 +233,6 @@ public class PlayerKnownList extends PlayableKnownList
|
|||||||
objAi.describeStateToPlayer(activeChar);
|
objAi.describeStateToPlayer(activeChar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}, _packetSendDelay + Rnd.get(50)); // Add additional 0-49ms in case of overlapping tasks on heavy load.
|
}, _packetSendDelay + Rnd.get(50)); // Add additional 0-49ms in case of overlapping tasks on heavy load.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,67 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the L2J Mobius project.
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package org.l2jmobius.gameserver.model.actor.poly;
|
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
|
||||||
|
|
||||||
public class ObjectPoly
|
|
||||||
{
|
|
||||||
private final WorldObject _activeObject;
|
|
||||||
private int _polyId;
|
|
||||||
private String _polyType;
|
|
||||||
|
|
||||||
public ObjectPoly(WorldObject activeObject)
|
|
||||||
{
|
|
||||||
_activeObject = activeObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPolyInfo(String polyType, String polyId)
|
|
||||||
{
|
|
||||||
setPolyId(Integer.parseInt(polyId));
|
|
||||||
setPolyType(polyType);
|
|
||||||
}
|
|
||||||
|
|
||||||
public WorldObject getActiveObject()
|
|
||||||
{
|
|
||||||
return _activeObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isMorphed()
|
|
||||||
{
|
|
||||||
return _polyType != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getPolyId()
|
|
||||||
{
|
|
||||||
return _polyId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPolyId(int value)
|
|
||||||
{
|
|
||||||
_polyId = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPolyType()
|
|
||||||
{
|
|
||||||
return _polyType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPolyType(String value)
|
|
||||||
{
|
|
||||||
_polyType = value;
|
|
||||||
}
|
|
||||||
}
|
|
@ -35,7 +35,6 @@ import org.l2jmobius.gameserver.network.serverpackets.PetInfo;
|
|||||||
import org.l2jmobius.gameserver.network.serverpackets.PetItemList;
|
import org.l2jmobius.gameserver.network.serverpackets.PetItemList;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.RelationChanged;
|
import org.l2jmobius.gameserver.network.serverpackets.RelationChanged;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SpawnItem;
|
import org.l2jmobius.gameserver.network.serverpackets.SpawnItem;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SpawnItemPoly;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.StaticObject;
|
import org.l2jmobius.gameserver.network.serverpackets.StaticObject;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.VehicleInfo;
|
import org.l2jmobius.gameserver.network.serverpackets.VehicleInfo;
|
||||||
@ -66,12 +65,6 @@ public class RequestRecordInfo extends GameClientPacket
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (object.getPoly().isMorphed() && object.getPoly().getPolyType().equals("item"))
|
|
||||||
{
|
|
||||||
player.sendPacket(new SpawnItemPoly(object));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (object instanceof ItemInstance)
|
if (object instanceof ItemInstance)
|
||||||
{
|
{
|
||||||
player.sendPacket(new SpawnItem((ItemInstance) object));
|
player.sendPacket(new SpawnItem((ItemInstance) object));
|
||||||
@ -161,5 +154,4 @@ public class RequestRecordInfo extends GameClientPacket
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -16,46 +16,26 @@
|
|||||||
*/
|
*/
|
||||||
package org.l2jmobius.gameserver.network.serverpackets;
|
package org.l2jmobius.gameserver.network.serverpackets;
|
||||||
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
|
||||||
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
|
||||||
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||||
|
|
||||||
public class CharInfo extends GameServerPacket
|
public class CharInfo extends GameServerPacket
|
||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(CharInfo.class.getName());
|
|
||||||
|
|
||||||
private final PlayerInstance _player;
|
private final PlayerInstance _player;
|
||||||
private final Inventory _inventory;
|
private final Inventory _inventory;
|
||||||
private final int _x;
|
|
||||||
private final int _y;
|
|
||||||
private final int _z;
|
|
||||||
private final int _heading;
|
|
||||||
private final int _mAtkSpd;
|
|
||||||
private final int _pAtkSpd;
|
|
||||||
private final int _runSpd;
|
private final int _runSpd;
|
||||||
private final int _walkSpd;
|
private final int _walkSpd;
|
||||||
private final int _flyRunSpd;
|
private final int _flyRunSpd;
|
||||||
private final int _flyWalkSpd;
|
private final int _flyWalkSpd;
|
||||||
private final float _moveMultiplier;
|
private final float _moveMultiplier;
|
||||||
private final float _attackSpeedMultiplier;
|
|
||||||
|
|
||||||
public CharInfo(PlayerInstance player)
|
public CharInfo(PlayerInstance player)
|
||||||
{
|
{
|
||||||
_player = player;
|
_player = player;
|
||||||
_inventory = player.getInventory();
|
_inventory = player.getInventory();
|
||||||
_x = player.getX();
|
|
||||||
_y = player.getY();
|
|
||||||
_z = player.getZ();
|
|
||||||
_heading = player.getHeading();
|
|
||||||
_mAtkSpd = player.getMAtkSpd();
|
|
||||||
_pAtkSpd = player.getPAtkSpd();
|
|
||||||
_attackSpeedMultiplier = player.getAttackSpeedMultiplier();
|
|
||||||
_moveMultiplier = player.getMovementSpeedMultiplier();
|
_moveMultiplier = player.getMovementSpeedMultiplier();
|
||||||
_runSpd = Math.round(player.getRunSpeed() / _moveMultiplier);
|
_runSpd = Math.round(player.getRunSpeed() / _moveMultiplier);
|
||||||
_walkSpd = Math.round(player.getWalkSpeed() / _moveMultiplier);
|
_walkSpd = Math.round(player.getWalkSpeed() / _moveMultiplier);
|
||||||
@ -67,103 +47,20 @@ public class CharInfo extends GameServerPacket
|
|||||||
protected final void writeImpl()
|
protected final void writeImpl()
|
||||||
{
|
{
|
||||||
boolean isGM = false;
|
boolean isGM = false;
|
||||||
|
|
||||||
final PlayerInstance tmp = getClient().getPlayer();
|
final PlayerInstance tmp = getClient().getPlayer();
|
||||||
if ((tmp != null) && tmp.isGM())
|
if ((tmp != null) && tmp.isGM())
|
||||||
{
|
{
|
||||||
isGM = true;
|
isGM = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isGM && _player.getAppearance().isInvisible())
|
if (!isGM && _player.getAppearance().isInvisible())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_player.getPoly().isMorphed())
|
|
||||||
{
|
|
||||||
final NpcTemplate template = NpcTable.getInstance().getTemplate(_player.getPoly().getPolyId());
|
|
||||||
if (template != null)
|
|
||||||
{
|
|
||||||
writeC(0x16);
|
|
||||||
writeD(_player.getObjectId());
|
|
||||||
writeD(_player.getPoly().getPolyId() + 1000000); // npctype id
|
|
||||||
writeD(_player.getKarma() > 0 ? 1 : 0);
|
|
||||||
writeD(_x);
|
|
||||||
writeD(_y);
|
|
||||||
writeD(_z);
|
|
||||||
writeD(_heading);
|
|
||||||
writeD(0x00);
|
|
||||||
writeD(_mAtkSpd);
|
|
||||||
writeD(_pAtkSpd);
|
|
||||||
writeD(_runSpd); // base run speed
|
|
||||||
writeD(_walkSpd); // base walk speed
|
|
||||||
writeD(_runSpd); // swim run speed (calculated by getter)
|
|
||||||
writeD(_walkSpd); // swim walk speed (calculated by getter)
|
|
||||||
writeD(_flyRunSpd); // fly run speed ?
|
|
||||||
writeD(_flyWalkSpd); // fly walk speed ?
|
|
||||||
writeD(_flyRunSpd);
|
|
||||||
writeD(_flyWalkSpd);
|
|
||||||
writeF(_moveMultiplier);
|
|
||||||
writeF(_attackSpeedMultiplier);
|
|
||||||
writeF(template.getCollisionRadius());
|
|
||||||
writeF(template.getCollisionHeight());
|
|
||||||
writeD(_inventory.getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); // right hand weapon
|
|
||||||
writeD(0);
|
|
||||||
writeD(_inventory.getPaperdollItemId(Inventory.PAPERDOLL_LHAND)); // left hand weapon
|
|
||||||
writeC(1); // name above char 1=true ... ??
|
|
||||||
writeC(_player.isRunning() ? 1 : 0);
|
|
||||||
writeC(_player.isInCombat() ? 1 : 0);
|
|
||||||
writeC(_player.isAlikeDead() ? 1 : 0);
|
|
||||||
|
|
||||||
// if(gmSeeInvis)
|
|
||||||
// {
|
|
||||||
writeC(0); // if the charinfo is written means receiver can see the char
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// writeC(_player.getAppearance().getInvisible() ? 1 : 0); // invisible ?? 0=false 1=true 2=summoned (only works if model has a summon animation)
|
|
||||||
// }
|
|
||||||
writeS(_player.getName());
|
|
||||||
|
|
||||||
if (_player.getAppearance().isInvisible())
|
|
||||||
{
|
|
||||||
writeS("Invisible");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
writeS(_player.getTitle());
|
|
||||||
}
|
|
||||||
|
|
||||||
writeD(0);
|
|
||||||
writeD(0);
|
|
||||||
writeD(0); // hmm karma ??
|
|
||||||
|
|
||||||
if (_player.getAppearance().isInvisible())
|
|
||||||
{
|
|
||||||
writeD((_player.getAbnormalEffect() | Creature.ABNORMAL_EFFECT_STEALTH));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
writeD(_player.getAbnormalEffect()); // C2
|
|
||||||
}
|
|
||||||
|
|
||||||
writeD(0); // C2
|
|
||||||
writeD(0); // C2
|
|
||||||
writeD(0); // C2
|
|
||||||
writeD(0); // C2
|
|
||||||
writeC(0); // C2
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LOGGER.warning("Character " + _player.getName() + " (" + _player.getObjectId() + ") morphed in a Npc (" + _player.getPoly().getPolyId() + ") w/o template.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
writeC(0x03);
|
writeC(0x03);
|
||||||
writeD(_x);
|
writeD(_player.getX());
|
||||||
writeD(_y);
|
writeD(_player.getY());
|
||||||
writeD(_z);
|
writeD(_player.getZ());
|
||||||
writeD(_player.getBoat() != null ? _player.getBoat().getObjectId() : 0);
|
writeD(_player.getBoat() != null ? _player.getBoat().getObjectId() : 0);
|
||||||
writeD(_player.getObjectId());
|
writeD(_player.getObjectId());
|
||||||
writeS(_player.getName());
|
writeS(_player.getName());
|
||||||
@ -219,8 +116,8 @@ public class CharInfo extends GameServerPacket
|
|||||||
writeD(_player.getPvpFlag());
|
writeD(_player.getPvpFlag());
|
||||||
writeD(_player.getKarma());
|
writeD(_player.getKarma());
|
||||||
|
|
||||||
writeD(_mAtkSpd);
|
writeD(_player.getMAtkSpd());
|
||||||
writeD(_pAtkSpd);
|
writeD(_player.getPAtkSpd());
|
||||||
|
|
||||||
writeD(_player.getPvpFlag());
|
writeD(_player.getPvpFlag());
|
||||||
writeD(_player.getKarma());
|
writeD(_player.getKarma());
|
||||||
@ -234,7 +131,7 @@ public class CharInfo extends GameServerPacket
|
|||||||
writeD(_flyRunSpd);
|
writeD(_flyRunSpd);
|
||||||
writeD(_flyWalkSpd);
|
writeD(_flyWalkSpd);
|
||||||
writeF(_moveMultiplier);
|
writeF(_moveMultiplier);
|
||||||
writeF(_attackSpeedMultiplier);
|
writeF(_player.getAttackSpeedMultiplier());
|
||||||
writeF(_player.getBaseTemplate().getCollisionRadius());
|
writeF(_player.getBaseTemplate().getCollisionRadius());
|
||||||
writeF(_player.getBaseTemplate().getCollisionHeight());
|
writeF(_player.getBaseTemplate().getCollisionHeight());
|
||||||
|
|
||||||
@ -324,7 +221,7 @@ public class CharInfo extends GameServerPacket
|
|||||||
|
|
||||||
writeD(_player.getAppearance().getNameColor());
|
writeD(_player.getAppearance().getNameColor());
|
||||||
|
|
||||||
writeD(_heading);
|
writeD(_player.getHeading());
|
||||||
|
|
||||||
writeD(_player.getPledgeClass());
|
writeD(_player.getPledgeClass());
|
||||||
writeD(_player.getPledgeType());
|
writeD(_player.getPledgeType());
|
||||||
@ -340,5 +237,4 @@ public class CharInfo extends GameServerPacket
|
|||||||
writeD(0x00);
|
writeD(0x00);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -61,9 +61,6 @@ public class NpcInfo extends GameServerPacket
|
|||||||
*/
|
*/
|
||||||
public NpcInfo(NpcInstance cha, Creature attacker)
|
public NpcInfo(NpcInstance cha, Creature attacker)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* if(cha.getMxcPoly() != null) { attacker.sendPacket(new MxCPolyInfo(cha)); return; }
|
|
||||||
*/
|
|
||||||
if (cha.getCustomNpcInstance() != null)
|
if (cha.getCustomNpcInstance() != null)
|
||||||
{
|
{
|
||||||
attacker.sendPacket(new CustomNpcInfo(cha));
|
attacker.sendPacket(new CustomNpcInfo(cha));
|
||||||
|
@ -1,175 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the L2J Mobius project.
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package org.l2jmobius.gameserver.network.serverpackets;
|
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
|
||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
|
||||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @version $Revision: 1.7.2.4.2.9 $ $Date: 2005/04/11 10:05:54 $
|
|
||||||
*/
|
|
||||||
public class NpcInfoPoly extends GameServerPacket
|
|
||||||
{
|
|
||||||
private Creature _creature;
|
|
||||||
private final WorldObject _obj;
|
|
||||||
private int _x;
|
|
||||||
private int _y;
|
|
||||||
private int _z;
|
|
||||||
private int _heading;
|
|
||||||
private final int _npcId;
|
|
||||||
private boolean _isAttackable;
|
|
||||||
private final boolean _isSummoned;
|
|
||||||
private boolean _isRunning;
|
|
||||||
private boolean _isInCombat;
|
|
||||||
private boolean _isAlikeDead;
|
|
||||||
private int _mAtkSpd;
|
|
||||||
private int _pAtkSpd;
|
|
||||||
private int _runSpd;
|
|
||||||
private int _walkSpd;
|
|
||||||
private int _swimRunSpd;
|
|
||||||
private int _swimWalkSpd;
|
|
||||||
private int _flRunSpd;
|
|
||||||
private int _flWalkSpd;
|
|
||||||
private int _flyRunSpd;
|
|
||||||
private int _flyWalkSpd;
|
|
||||||
private int _rhand;
|
|
||||||
private int _lhand;
|
|
||||||
private String _name;
|
|
||||||
private String _title;
|
|
||||||
private int _abnormalEffect;
|
|
||||||
NpcTemplate _template;
|
|
||||||
private final int _collisionRadius;
|
|
||||||
private final int _collisionHeight;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Instantiates a new npc info poly.
|
|
||||||
* @param obj the obj
|
|
||||||
* @param attacker the attacker
|
|
||||||
*/
|
|
||||||
public NpcInfoPoly(WorldObject obj, Creature attacker)
|
|
||||||
{
|
|
||||||
_obj = obj;
|
|
||||||
_npcId = obj.getPoly().getPolyId();
|
|
||||||
_template = NpcTable.getInstance().getTemplate(_npcId);
|
|
||||||
_isAttackable = true;
|
|
||||||
_rhand = 0;
|
|
||||||
_lhand = 0;
|
|
||||||
_isSummoned = false;
|
|
||||||
_collisionRadius = _template.getCollisionRadius();
|
|
||||||
_collisionHeight = _template.getCollisionHeight();
|
|
||||||
if (_obj instanceof Creature)
|
|
||||||
{
|
|
||||||
_creature = (Creature) obj;
|
|
||||||
_isAttackable = obj.isAutoAttackable(attacker);
|
|
||||||
_rhand = _template.getRhand();
|
|
||||||
_lhand = _template.getLhand();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_obj instanceof ItemInstance)
|
|
||||||
{
|
|
||||||
_x = _obj.getX();
|
|
||||||
_y = _obj.getY();
|
|
||||||
_z = _obj.getZ();
|
|
||||||
_heading = 0;
|
|
||||||
_mAtkSpd = 100; // yes, an item can be dread as death
|
|
||||||
_pAtkSpd = 100;
|
|
||||||
_runSpd = 120;
|
|
||||||
_walkSpd = 80;
|
|
||||||
_swimRunSpd = _flRunSpd = _flyRunSpd = _runSpd;
|
|
||||||
_swimWalkSpd = _flWalkSpd = _flyWalkSpd = _walkSpd;
|
|
||||||
_isRunning = _isInCombat = _isAlikeDead = false;
|
|
||||||
_name = "item";
|
|
||||||
_title = "polymorphed";
|
|
||||||
_abnormalEffect = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_x = _creature.getX();
|
|
||||||
_y = _creature.getY();
|
|
||||||
_z = _creature.getZ();
|
|
||||||
_heading = _creature.getHeading();
|
|
||||||
_mAtkSpd = _creature.getMAtkSpd();
|
|
||||||
_pAtkSpd = _creature.getPAtkSpd();
|
|
||||||
_runSpd = _creature.getRunSpeed();
|
|
||||||
_walkSpd = _creature.getWalkSpeed();
|
|
||||||
_swimRunSpd = _flRunSpd = _flyRunSpd = _runSpd;
|
|
||||||
_swimWalkSpd = _flWalkSpd = _flyWalkSpd = _walkSpd;
|
|
||||||
_isRunning = _creature.isRunning();
|
|
||||||
_isInCombat = _creature.isInCombat();
|
|
||||||
_isAlikeDead = _creature.isAlikeDead();
|
|
||||||
_name = _creature.getName();
|
|
||||||
_title = _creature.getTitle();
|
|
||||||
_abnormalEffect = _creature.getAbnormalEffect();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
* @see org.l2jmobius.gameserver.network.serverpackets.L2GameServerPacket#writeImpl()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
protected final void writeImpl()
|
|
||||||
{
|
|
||||||
writeC(0x16);
|
|
||||||
writeD(_obj.getObjectId());
|
|
||||||
writeD(_npcId + 1000000); // npctype id
|
|
||||||
writeD(_isAttackable ? 1 : 0);
|
|
||||||
writeD(_x);
|
|
||||||
writeD(_y);
|
|
||||||
writeD(_z);
|
|
||||||
writeD(_heading);
|
|
||||||
writeD(0x00);
|
|
||||||
writeD(_mAtkSpd);
|
|
||||||
writeD(_pAtkSpd);
|
|
||||||
writeD(_runSpd);
|
|
||||||
writeD(_walkSpd);
|
|
||||||
writeD(_swimRunSpd/* 0x32 */); // swimspeed
|
|
||||||
writeD(_swimWalkSpd/* 0x32 */); // swimspeed
|
|
||||||
writeD(_flRunSpd);
|
|
||||||
writeD(_flWalkSpd);
|
|
||||||
writeD(_flyRunSpd);
|
|
||||||
writeD(_flyWalkSpd);
|
|
||||||
writeF(1/* _activeChar.getProperMultiplier() */);
|
|
||||||
writeF(1/* _activeChar.getAttackSpeedMultiplier() */);
|
|
||||||
writeF(_collisionRadius);
|
|
||||||
writeF(_collisionHeight);
|
|
||||||
writeD(_rhand); // right hand weapon
|
|
||||||
writeD(0);
|
|
||||||
writeD(_lhand); // left hand weapon
|
|
||||||
writeC(1); // name above char 1=true ... ??
|
|
||||||
writeC(_isRunning ? 1 : 0);
|
|
||||||
writeC(_isInCombat ? 1 : 0);
|
|
||||||
writeC(_isAlikeDead ? 1 : 0);
|
|
||||||
writeC(_isSummoned ? 2 : 0); // invisible ?? 0=false 1=true 2=summoned (only works if model has a summon animation)
|
|
||||||
writeS(_name);
|
|
||||||
writeS(_title);
|
|
||||||
writeD(0);
|
|
||||||
writeD(0);
|
|
||||||
writeD(0000); // hmm karma ??
|
|
||||||
|
|
||||||
writeH(_abnormalEffect); // C2
|
|
||||||
writeH(0x00); // C2
|
|
||||||
writeD(0000); // C2
|
|
||||||
writeD(0000); // C2
|
|
||||||
writeD(0000); // C2
|
|
||||||
writeD(0000); // C2
|
|
||||||
writeC(0000); // C2
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,76 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the L2J Mobius project.
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package org.l2jmobius.gameserver.network.serverpackets;
|
|
||||||
|
|
||||||
import org.l2jmobius.gameserver.model.WorldObject;
|
|
||||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 15 ee cc 11 43 object id 39 00 00 00 item id 8f 14 00 00 x b7 f1 00 00 y 60 f2 ff ff z 01 00 00 00 show item count 7a 00 00 00 count . format dddddddd
|
|
||||||
* @version $Revision: 1.3.2.1.2.3 $ $Date: 2005/03/27 15:29:39 $
|
|
||||||
*/
|
|
||||||
public class SpawnItemPoly extends GameServerPacket
|
|
||||||
{
|
|
||||||
private int _objectId;
|
|
||||||
private int _itemId;
|
|
||||||
private int _x;
|
|
||||||
private int _y;
|
|
||||||
private int _z;
|
|
||||||
private int _stackable;
|
|
||||||
private int _count;
|
|
||||||
|
|
||||||
public SpawnItemPoly(WorldObject object)
|
|
||||||
{
|
|
||||||
if (object instanceof ItemInstance)
|
|
||||||
{
|
|
||||||
final ItemInstance item = (ItemInstance) object;
|
|
||||||
_objectId = object.getObjectId();
|
|
||||||
_itemId = object.getPoly().getPolyId();
|
|
||||||
_x = item.getX();
|
|
||||||
_y = item.getY();
|
|
||||||
_z = item.getZ();
|
|
||||||
_stackable = item.isStackable() ? 0x01 : 0x00;
|
|
||||||
_count = item.getCount();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_objectId = object.getObjectId();
|
|
||||||
_itemId = object.getPoly().getPolyId();
|
|
||||||
_x = object.getX();
|
|
||||||
_y = object.getY();
|
|
||||||
_z = object.getZ();
|
|
||||||
_stackable = 0x00;
|
|
||||||
_count = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected final void writeImpl()
|
|
||||||
{
|
|
||||||
writeC(0x0b);
|
|
||||||
writeD(_objectId);
|
|
||||||
writeD(_itemId);
|
|
||||||
|
|
||||||
writeD(_x);
|
|
||||||
writeD(_y);
|
|
||||||
writeD(_z);
|
|
||||||
// only show item count if it is a stackable item
|
|
||||||
writeD(_stackable);
|
|
||||||
writeD(_count);
|
|
||||||
writeD(0x00); // c2
|
|
||||||
}
|
|
||||||
}
|
|
@ -17,12 +17,10 @@
|
|||||||
package org.l2jmobius.gameserver.network.serverpackets;
|
package org.l2jmobius.gameserver.network.serverpackets;
|
||||||
|
|
||||||
import org.l2jmobius.Config;
|
import org.l2jmobius.Config;
|
||||||
import org.l2jmobius.gameserver.datatables.sql.NpcTable;
|
|
||||||
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate;
|
|
||||||
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||||
|
|
||||||
public class UserInfo extends GameServerPacket
|
public class UserInfo extends GameServerPacket
|
||||||
@ -217,14 +215,6 @@ public class UserInfo extends GameServerPacket
|
|||||||
{
|
{
|
||||||
title = "[Invisible]";
|
title = "[Invisible]";
|
||||||
}
|
}
|
||||||
if (_player.getPoly().isMorphed())
|
|
||||||
{
|
|
||||||
final NpcTemplate polyObj = NpcTable.getInstance().getTemplate(_player.getPoly().getPolyId());
|
|
||||||
if (polyObj != null)
|
|
||||||
{
|
|
||||||
title += " - " + polyObj.getName();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
writeS(title);
|
writeS(title);
|
||||||
|
|
||||||
writeD(_player.getClanId());
|
writeD(_player.getClanId());
|
||||||
|
Loading…
Reference in New Issue
Block a user