Package com.mmoscene.h4j.communication

Examples of com.mmoscene.h4j.communication.Response


import com.mmoscene.h4j.H4J;
import com.mmoscene.h4j.communication.Response;

public class SendAuthenicationOkayMessageComposer {
    public static Response compose() {
        Response response = new Response();

        response.init(new Integer(H4J.getHeaders().get("SendAuthenicationOkayMessageComposer")));

        return response;
    }
View Full Code Here


import com.mmoscene.h4j.habbohotel.hotelview.PromoPiece;
import org.magicwerk.brownies.collections.GapList;

public class LoadPromotionalNewsMessageComposer {
    public static Response compose(GapList<PromoPiece> pieces) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("LoadPromotionalNewsMessageComposer"));

        response.addInt(pieces.size());

        for(PromoPiece p : pieces) {
            response.addInt(p.getId());

            response.addString(p.getName());
            response.addString(p.getStory());
            response.addString(p.getButtonText());
            response.addInt(0);
            response.addString(p.getExternalURL());
            response.addString(p.getImage());
        }
        return response;
    }
View Full Code Here

import com.mmoscene.h4j.H4J;
import com.mmoscene.h4j.communication.Response;

public class SendAuthenicationOkayComposer {
    public static Response compose() {
        Response response = new Response();

        response.init(new Integer(H4J.getHeaders().get("SendAuthenicationOkayComposer")));

        return response;
    }
View Full Code Here

import com.mmoscene.h4j.communication.Response;

public class SendBannerMessageMessageComposer {

    public static Response compose() {
        Response response = new Response();

        response.init(new Integer(H4J.getHeaders().get("SendBannerMessageMessageComposer")));
        response.addString("12f449917de4f94a8c48dbadd92b6276");
        response.addBool(false);

        return response;
    }
View Full Code Here

import com.mmoscene.h4j.habbohotel.hotelview.PromoPiece;
import org.magicwerk.brownies.collections.GapList;

public class LoadPromotionalNewsComposer {
    public static Response compose(GapList<PromoPiece> pieces) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("LoadPromotionalNewsComposer"));

        response.addInt(pieces.size());

        for(PromoPiece p : pieces) {
            response.addInt(p.getId());

            response.addString(p.getName());
            response.addString(p.getStory());
            response.addString(p.getButtonText());
            response.addInt(0);
            response.addString(p.getExternalURL());
            response.addString(p.getImage());
        }
        return response;
    }
View Full Code Here

import gnu.trove.map.hash.THashMap;
import org.magicwerk.brownies.collections.GapList;

public class SendMessengerQueryResultsComposer {
    public static Response compose(THashMap<Integer, Friend> friends, GapList<Friend> results) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendMessengerQueryResultsComposer"));
        response.addInt(friends.size());

        for(Friend friend : friends.values()) {
            response.addInt(friend.getId());
            response.addString(friend.getUsername());
            response.addString(friend.getMotto());
            response.addBool(H4J.getNetwork().getSessionManager().getOnlineStatusById(friend.getId()));
            response.addBool(false);
            response.addString("");
            response.addInt(0);
            response.addString(friend.getLook());
            response.addString("");
        }

        response.addInt(results.size());

        for(Friend friend : results) {
            response.addInt(friend.getId());
            response.addString(friend.getUsername());
            response.addString(friend.getMotto());
            response.addBool(H4J.getNetwork().getSessionManager().getOnlineStatusById(friend.getId()));
            response.addBool(false);
            response.addString("");
            response.addInt(0);
            response.addString(friend.getLook());
            response.addString("");
        }
        return response;
    }
View Full Code Here

import com.mmoscene.h4j.H4J;
import com.mmoscene.h4j.communication.Response;

public class SendWelcomeMessageMessageComposer {
    public static Response compose() {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendWelcomeMessageMessageComposer"));
        response.addInt(0);

        return response;
    }
View Full Code Here

import com.mmoscene.h4j.H4J;
import com.mmoscene.h4j.communication.Response;

public class LoadUserCreditsComposer {
    public static Response compose(int credits) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("LoadUserCreditsComposer"));
        response.addString(credits + ".0");

        return response;
    }
View Full Code Here

import com.mmoscene.h4j.H4J;
import com.mmoscene.h4j.communication.Response;

public class SendRoomSayMessageComposer {
    public static Response compose(int user, String msg, int smile, int color) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendRoomSayMessageComposer"));
        response.addInt(user);
        response.addString(msg);
        response.addInt(smile);
        response.addInt(color);
        response.addInt(0);
        response.addInt(-1);

        return response;
    }
View Full Code Here

import com.mmoscene.h4j.habbohotel.hotelview.HotelViewUser;
import org.magicwerk.brownies.collections.GapList;

public class SendHotelViewLooksMessageComposer {
    public static Response compose(String key, GapList<HotelViewUser> users) {
        Response response = new Response();

        response.init(H4J.getHeaders().getInt("SendHotelViewLooksMessageComposer"));
        response.addString(key);

        response.addInt(users.size());

        for(HotelViewUser u : users) {
            response.addInt(u.getId());
            response.addString(u.getUsername());
            response.addString(u.getLook());
            response.addInt(1);
            response.addInt(u.getValue());
        }
        return response;
    }
View Full Code Here

TOP

Related Classes of com.mmoscene.h4j.communication.Response

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.