Chat ban command fixed and upgraded.
This commit is contained in:
@@ -30,6 +30,9 @@ import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.handler.IPunishmentHandler;
|
||||
import com.l2jmobius.gameserver.handler.PunishmentHandler;
|
||||
import com.l2jmobius.gameserver.instancemanager.PunishmentManager;
|
||||
import com.l2jmobius.gameserver.model.L2World;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.skills.AbnormalVisualEffect;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
@@ -234,6 +237,15 @@ public class PunishmentTask implements Runnable
|
||||
}
|
||||
}
|
||||
|
||||
if (_type.equals(PunishmentType.CHAT_BAN) && _affect.equals(PunishmentAffect.CHARACTER))
|
||||
{
|
||||
final L2PcInstance player = L2World.getInstance().getPlayer(Integer.valueOf(_key));
|
||||
if (player != null)
|
||||
{
|
||||
player.getEffectList().stopAbnormalVisualEffect(AbnormalVisualEffect.NO_CHAT);
|
||||
}
|
||||
}
|
||||
|
||||
final IPunishmentHandler handler = PunishmentHandler.getInstance().getHandler(_type);
|
||||
if (handler != null)
|
||||
{
|
||||
|
@@ -263,6 +263,12 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
}
|
||||
}
|
||||
|
||||
// Chat banned icon.
|
||||
if (activeChar.isChatBanned())
|
||||
{
|
||||
activeChar.getEffectList().startAbnormalVisualEffect(AbnormalVisualEffect.NO_CHAT);
|
||||
}
|
||||
|
||||
// Set dead status if applies
|
||||
if (activeChar.getCurrentHp() < 0.5)
|
||||
{
|
||||
|
Reference in New Issue
Block a user