Package gwlpr.protocol.gameserver.outbound

Examples of gwlpr.protocol.gameserver.outbound.P221_UpdateFaction


    {
        // retrieve some entity components
        CharData charData = entity.get(CharData.class);
        Map<Faction, Integer[]> factionData = entity.get(FactionData.class).factionPoints;
       
        P221_UpdateFaction updateFaction = new P221_UpdateFaction();
        updateFaction.init(channel);
        updateFaction.setLevel(charData.level);
        updateFaction.setMorale(charData.morale);
        updateFaction.setExperience(charData.experience);
       
        if (factionData.containsKey(Faction.Kurzick))
        {
            updateFaction.setKurzickFree(factionData.get(Faction.Kurzick)[0]);
            updateFaction.setKurzickTotal(factionData.get(Faction.Kurzick)[1]);
        }
       
        if (factionData.containsKey(Faction.Luxon))
        {
            updateFaction.setLuxonFree(factionData.get(Faction.Luxon)[0]);
            updateFaction.setLuxonTotal(factionData.get(Faction.Luxon)[1]);
        }
       
        if (factionData.containsKey(Faction.Imperial))
        {
            updateFaction.setImperialFree(factionData.get(Faction.Imperial)[0]);
            updateFaction.setImperialTotal(factionData.get(Faction.Imperial)[1]);
        }
       
        if (factionData.containsKey(Faction.Balthazar))
        {
            updateFaction.setBalthFree(factionData.get(Faction.Balthazar)[0]);
            updateFaction.setBalthTotal(factionData.get(Faction.Balthazar)[1]);
        }

        channel.writeAndFlush(updateFaction);
    }
View Full Code Here

TOP

Related Classes of gwlpr.protocol.gameserver.outbound.P221_UpdateFaction

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.