public void add(int emotionId, int dispearTime, boolean isNew) { if (emotions == null) { emotions = new HashMap<Integer, Emotion>(); } Emotion emotion = new Emotion(emotionId, dispearTime); emotions.put(emotionId, emotion); if (isNew) { if (emotion.getExpireTime() != 0) { ExpireTimerTask.getInstance().addTask(emotion, owner); } DAOManager.getDAO(PlayerEmotionListDAO.class).insertEmotion(owner, emotion); PacketSendUtility.sendPacket( owner, new SM_EMOTION_LIST((byte) 1, Collections.singletonList(emotion))); } }