资源简介
冒险岛,079,072,067,java源码加库文件,CMS,可以编译!
代码片段和文件信息
package client;
import database.DBConPool;
import java.io.Serializable;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Collection;
import java.util.linkedHashMap;
import java.util.Map;
import tools.FileoutputUtil;
import tools.packet.CWvsContext.BuddylistPacket;
public class BuddyList implements Serializable {
public static enum BuddyOperation {
ADDED DELETED
}
public static enum BuddyAddResult {
BUDDYLIST_FULL ALREADY_ON_LIST OK
}
private static final long serialVersionUID = 1413738569L;
private final Map buddies;
private byte capacity;
private boolean changed = false;
public BuddyList(byte capacity) {
this.buddies = new linkedHashMap<>();
this.capacity = capacity;
}
public boolean contains(int characterId) {
return buddies.containsKey(characterId);
}
public boolean containsVisible(int characterId) {
BuddylistEntry ble = buddies.get(characterId);
if (ble == null) {
return false;
}
return ble.isVisible();
}
public byte getCapacity() {
return capacity;
}
public void setCapacity(byte capacity) {
this.capacity = capacity;
}
public BuddylistEntry get(int characterId) {
return buddies.get(characterId);
}
public BuddylistEntry get(String characterName) {
String lowerCaseName = characterName.toLowerCase();
for (BuddylistEntry ble : buddies.values()) {
if (ble.getName().toLowerCase().equals(lowerCaseName)) {
return ble;
}
}
return null;
}
public void put(BuddylistEntry entry) {
buddies.put(entry.getCharacterId() entry);
changed = true;
}
public void remove(int characterId) {
buddies.remove(characterId);
changed = true;
}
public Collection getBuddies() {
return buddies.values();
}
public boolean isFull() {
return buddies.size() >= capacity;
}
public int[] getBuddyIds() {
int buddyIds[] = new int[buddies.size()];
int i = 0;
for (BuddylistEntry ble : buddies.values()) {
if (ble.isVisible()) {
buddyIds[i++] = ble.getCharacterId();
}
}
return buddyIds;
}
public void loadFromTransfer(final Map data) {
CharacterNameAndId buddyid;
for (final Map.Entry qs : data.entrySet()) {
buddyid = qs.getKey();
put(new BuddylistEntry(buddyid.getName() buddyid.getId() buddyid.getGroup() -1 qs.getValue()));
}
}
public void loadFromDb(int characterId) throws SQLException {
try (Connection con = DBConPool.getInstance().getDataSource().getConnection(); PreparedStatement ps
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3597 2019-01-14 20:43 067源码\build.xm
文件 631281 2017-01-31 03:06 067源码\lib\beansbinding-1.2.1.jar
文件 2115941 2016-08-25 16:49 067源码\lib\druid-1.0.25.jar
文件 872300 2016-08-10 14:42 067源码\lib\mysql-connector-java-bin.jar
文件 3379741 2016-05-26 01:51 067源码\lib\netty-all-4.1.0.Final.jar
文件 3503790 2016-08-10 14:42 067源码\lib\pkgnx-2.0.4-jar-with-dependencies.jar
文件 263928 2016-08-10 14:42 067源码\lib\Reflections.jar
文件 29257 2016-09-01 19:52 067源码\lib\slf4j-api-1.7.7.jar
文件 10683 2016-09-01 19:52 067源码\lib\slf4j-simple-1.7.7.jar
文件 85 2019-01-14 20:43 067源码\manifest.mf
文件 79855 2019-01-14 20:43 067源码\nbproject\build-impl.xm
文件 475 2019-01-14 20:43 067源码\nbproject\genfiles.properties
文件 120 2019-01-14 20:43 067源码\nbproject\private\private.properties
文件 3576 2019-01-14 20:43 067源码\nbproject\project.properties
文件 512 2019-01-14 20:43 067源码\nbproject\project.xm
文件 3995 2016-08-24 15:15 067源码\src\client\anticheat\CheatingOffense.java
文件 3097 2016-08-24 15:15 067源码\src\client\anticheat\CheatingOffenseEntry.java
文件 3864 2016-08-24 15:15 067源码\src\client\anticheat\CheatingOffensePersister.java
文件 23685 2016-09-21 18:04 067源码\src\client\anticheat\CheatTracker.java
文件 1676 2016-08-24 15:15 067源码\src\client\anticheat\ReportType.java
文件 4118 2016-09-06 16:32 067源码\src\client\BuddyList.java
文件 1886 2016-08-24 15:15 067源码\src\client\BuddylistEntry.java
文件 509 2016-08-24 15:15 067源码\src\client\CardData.java
文件 454 2016-08-24 15:15 067源码\src\client\CharacterNameAndId.java
文件 5260 2016-08-24 15:15 067源码\src\client\DebugWindow.form
文件 7288 2016-08-24 15:15 067源码\src\client\DebugWindow.java
文件 4080 2016-08-24 15:15 067源码\src\client\InnerAbillity.java
文件 798 2016-08-24 15:15 067源码\src\client\InnerSkillValueHolder.java
文件 31246 2016-09-13 13:39 067源码\src\client\inventory\Equip.java
文件 3119 2016-08-24 15:15 067源码\src\client\inventory\EquipAdditions.java
............此处省略553个文件信息
评论
共有 条评论