Skip to content
Snippets Groups Projects
Commit 016c4c46 authored by Zealar's avatar Zealar
Browse files

Fix few problems when admin change user class

+ Drop underground
+ Animation position
+ Char texture stuck
+ Target window show empty HP/MP bars

Fix #267
parent f4ab14b2
No related branches found
No related tags found
Loading
...@@ -33,6 +33,7 @@ import com.l2jserver.Config; ...@@ -33,6 +33,7 @@ import com.l2jserver.Config;
import com.l2jserver.commons.database.pool.impl.ConnectionFactory; import com.l2jserver.commons.database.pool.impl.ConnectionFactory;
import com.l2jserver.gameserver.data.sql.impl.CharNameTable; import com.l2jserver.gameserver.data.sql.impl.CharNameTable;
import com.l2jserver.gameserver.data.xml.impl.ClassListData; import com.l2jserver.gameserver.data.xml.impl.ClassListData;
import com.l2jserver.gameserver.data.xml.impl.TransformData;
import com.l2jserver.gameserver.handler.IAdminCommandHandler; import com.l2jserver.gameserver.handler.IAdminCommandHandler;
import com.l2jserver.gameserver.model.L2Object; import com.l2jserver.gameserver.model.L2Object;
import com.l2jserver.gameserver.model.L2World; import com.l2jserver.gameserver.model.L2World;
...@@ -368,6 +369,7 @@ public class AdminEditChar implements IAdminCommandHandler ...@@ -368,6 +369,7 @@ public class AdminEditChar implements IAdminCommandHandler
} }
if (valid && (player.getClassId().getId() != classidval)) if (valid && (player.getClassId().getId() != classidval))
{ {
TransformData.getInstance().transformPlayer(255, player);
player.setClassId(classidval); player.setClassId(classidval);
if (!player.isSubClassActive()) if (!player.isSubClassActive())
{ {
...@@ -376,7 +378,10 @@ public class AdminEditChar implements IAdminCommandHandler ...@@ -376,7 +378,10 @@ public class AdminEditChar implements IAdminCommandHandler
String newclass = ClassListData.getInstance().getClass(player.getClassId()).getClassName(); String newclass = ClassListData.getInstance().getClass(player.getClassId()).getClassName();
player.storeMe(); player.storeMe();
player.sendMessage("A GM changed your class to " + newclass + "."); player.sendMessage("A GM changed your class to " + newclass + ".");
player.untransform();
player.broadcastUserInfo(); player.broadcastUserInfo();
activeChar.setTarget(null);
activeChar.setTarget(player);
activeChar.sendMessage(player.getName() + " is a " + newclass + "."); activeChar.sendMessage(player.getName() + " is a " + newclass + ".");
} }
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment