當前位置: 首頁>>代碼示例>>Java>>正文


Java BuddyOperation類代碼示例

本文整理匯總了Java中client.BuddyList.BuddyOperation的典型用法代碼示例。如果您正苦於以下問題:Java BuddyOperation類的具體用法?Java BuddyOperation怎麽用?Java BuddyOperation使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BuddyOperation類屬於client.BuddyList包,在下文中一共展示了BuddyOperation類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: buddyChanged

import client.BuddyList.BuddyOperation; //導入依賴的package包/類
public void buddyChanged(int cid, int cidFrom, String name, int channel, BuddyOperation operation) {
    MapleCharacter addChar = getPlayerStorage().getCharacterById(cid);
    if (addChar != null) {
        BuddyList buddylist = addChar.getBuddylist();
        switch (operation) {
            case ADDED:
                if (buddylist.contains(cidFrom)) {
                    buddylist.put(new BuddylistEntry(name, "Default Group", cidFrom, channel, true));
                    addChar.getClient().announce(MaplePacketCreator.updateBuddyChannel(cidFrom, (byte) (channel - 1)));
                }
                break;
            case DELETED:
                if (buddylist.contains(cidFrom)) {
                    buddylist.put(new BuddylistEntry(name, "Default Group", cidFrom, (byte) -1, buddylist.get(cidFrom).isVisible()));
                    addChar.getClient().announce(MaplePacketCreator.updateBuddyChannel(cidFrom, (byte) -1));
                }
                break;
        }
    }
}
 
開發者ID:NovaStory,項目名稱:AeroStory,代碼行數:21,代碼來源:World.java

示例2: buddyChanged

import client.BuddyList.BuddyOperation; //導入依賴的package包/類
public static void buddyChanged(int cid, int cidFrom, String name, int channel, BuddyOperation operation, String group) {
    int ch = Find.findChannel(cid);
    if (ch > 0) {
        final MapleCharacter addChar = ChannelServer.getInstance(ch).getPlayerStorage().getCharacterById(cid);
        if (addChar != null) {
            final BuddyList buddylist = addChar.getBuddylist();
            switch (operation) {
                case ADDED:
                    if (buddylist.contains(cidFrom)) {
                        buddylist.put(new BuddylistEntry(name, cidFrom, group, channel, true));
                        addChar.getClient().getSession().write(BuddylistPacket.updateBuddyChannel(cidFrom, channel - 1));
                    }
                    break;
                case DELETED:
                    if (buddylist.contains(cidFrom)) {
                        buddylist.put(new BuddylistEntry(name, cidFrom, group, -1, buddylist.get(cidFrom).isVisible()));
                        addChar.getClient().getSession().write(BuddylistPacket.updateBuddyChannel(cidFrom, -1));
                    }
                    break;
            }
        }
    }
}
 
開發者ID:ergothvs,項目名稱:Lucid2.0,代碼行數:24,代碼來源:World.java

示例3: notifyRemoteChannel

import client.BuddyList.BuddyOperation; //導入依賴的package包/類
private static void notifyRemoteChannel(final MapleClient c, final int remoteChannel, final int otherCid, final String group, final BuddyOperation operation) {
    final MapleCharacter player = c.getPlayer();

    if (remoteChannel > 0) {
        World.Buddy.buddyChanged(otherCid, player.getId(), player.getName(), c.getChannel(), operation, group);
    }
}
 
開發者ID:ergothvs,項目名稱:Lucid2.0,代碼行數:8,代碼來源:BuddyListHandler.java

示例4: notifyRemoteChannel

import client.BuddyList.BuddyOperation; //導入依賴的package包/類
private void notifyRemoteChannel(MapleClient c, int remoteChannel, int otherCid, BuddyOperation operation) {
    MapleCharacter player = c.getPlayer();
    if (remoteChannel != -1) {
        c.getWorldServer().buddyChanged(otherCid, player.getId(), player.getName(), c.getChannel(), operation);
    }
}
 
開發者ID:NovaStory,項目名稱:AeroStory,代碼行數:7,代碼來源:BuddylistModifyHandler.java

示例5: buddyChanged

import client.BuddyList.BuddyOperation; //導入依賴的package包/類
public void buddyChanged(int cid, int cidFrom, String name, int channel, BuddyOperation op) throws RemoteException; 
開發者ID:NovaStory,項目名稱:AeroStory,代碼行數:2,代碼來源:ChannelWorldInterface.java


注:本文中的client.BuddyList.BuddyOperation類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。