테스트

aion-server 4.8

Gitteol
최고관리자 · 1 · 💬 0 클론/새로받기
 4.8 61f661d · 1 commits 새로받기(Pull)
game-server/src/com/aionemu/gameserver/network/aion/clientpackets/CM_FIND_GROUP.java
package com.aionemu.gameserver.network.aion.clientpackets;

import java.util.Set;

import org.slf4j.LoggerFactory;

import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.network.aion.AionClientPacket;
import com.aionemu.gameserver.network.aion.AionConnection.State;
import com.aionemu.gameserver.services.findgroup.FindGroupService;

/**
 * @author cura, MrPoke
 */
public class CM_FIND_GROUP extends AionClientPacket {

	private int action;
	private int playerOrTeamId;
	private int bannedPlayerId;
	private String message;
	private int groupType;
	private int classId;
	private int level;
	private byte serverId;
	private byte unk1;
	private byte unk2;
	private byte unk3;
	private int instanceMaskId;
	private int minMembers;
	private byte instanceApplicationReply;

	public CM_FIND_GROUP(int opcode, Set<State> validStates) {
		super(opcode, validStates);
	}

	@Override
	protected void readImpl() {
		action = readUC();

		switch (action) {
			case 0: // recruit list
				break;
			case 1: // offer delete
				playerOrTeamId = readD();
				serverId = readC();
				unk1 = readC();
				unk2 = readC();
				unk3 = readC();
				break;
			case 2: // send offer
				playerOrTeamId = readD();
				message = readS();
				groupType = readUC();
				break;
			case 3: // recruit update
				playerOrTeamId = readD();
				serverId = readC();
				unk1 = readC();
				unk2 = readC();
				unk3 = readC();
				message = readS();
				groupType = readUC();
				break;
			case 4: // apply list
				break;
			case 5: // post delete
				playerOrTeamId = readD();
				break;
			case 6: // apply create
			case 7: // apply update
				playerOrTeamId = readD();
				message = readS();
				groupType = readUC();
				classId = readUC();
				level = readUC();
				break;
			case 8: // register InstanceGroup
				instanceMaskId = readD();
				readUC(); // unk 0
				message = readS();// text
				minMembers = readUC();// minMembers chosen by writer
				break;
			case 9: // remove instance group
				playerOrTeamId = readD();
				instanceMaskId = readD();
				break;
			case 10: // show instance groups
				break;
			case 11: // apply for instance group
				playerOrTeamId = readD();
				instanceMaskId = readD();
				break;
			case 12: // accept/deny instance group applicant
				playerOrTeamId = readD();
				instanceApplicationReply = readC(); // 1: accept, 0: deny
				break;
			case 13: // triggered every 50s when instance group tab is open or option "Automatic search when the window is closed" is checked
				break;
			case 15: // show instance group member info
				playerOrTeamId = readD();
				instanceMaskId = readD();
				break;
			case 17:
				playerOrTeamId = readD();
				instanceMaskId = readD();
				message = readS();
				break;
			case 20: // clicked Enter button in Prepare for entry window
				break;
			case 25: // ban from instance group
				playerOrTeamId = readD();
				instanceMaskId = readD();
				bannedPlayerId = readD();
				break;
			default:
				LoggerFactory.getLogger(CM_FIND_GROUP.class).warn("Unknown find group action " + action);
				break;
		}
	}

	@Override
	protected void runImpl() {
		Player player = getConnection().getActivePlayer();
		switch (action) {
			case 0 -> FindGroupService.getInstance().showRecruitments(player);
			case 1 -> FindGroupService.getInstance().removeRecruitment(player, serverId, unk1, unk2, unk3);
			case 2 -> FindGroupService.getInstance().addRecruitment(player, message, groupType);
			case 3 -> FindGroupService.getInstance().updateRecruitment(player, message, groupType);
			case 4 -> FindGroupService.getInstance().showApplications(player);
			case 5 -> FindGroupService.getInstance().removeApplication(player);
			case 6 -> FindGroupService.getInstance().addApplication(player, message, groupType, classId, level);
			case 7 -> FindGroupService.getInstance().updateApplication(player, message, groupType, classId, level);
			case 8 -> FindGroupService.getInstance().registerInstanceGroup(player, instanceMaskId, message, minMembers);
			case 9 -> FindGroupService.getInstance().removeInstanceGroup(player);
			case 10 -> FindGroupService.getInstance().showInstanceGroups(player, false);
			case 11 -> FindGroupService.getInstance().sendInstanceApplication(player, playerOrTeamId);
			case 12 -> FindGroupService.getInstance().sendInstanceApplicationResult(player, playerOrTeamId, instanceApplicationReply);
			case 13 -> FindGroupService.getInstance().showInstanceGroups(player, true);
			case 15 -> FindGroupService.getInstance().showInstanceGroupMembersInfo(player, playerOrTeamId);
			case 17 -> FindGroupService.getInstance().updateInstanceGroup(player, message);
		}
	}
}

📎 첨부파일

댓글 작성 권한이 없습니다.
🏆 포인트 랭킹 TOP 10
순위 닉네임 포인트
1 no_profile 타키야겐지쪽지보내기 자기소개 아이디로 검색 전체게시물 102,949
2 no_profile 동가리쪽지보내기 자기소개 아이디로 검색 전체게시물 63,733
3 no_profile 라프텔쪽지보내기 자기소개 아이디로 검색 전체게시물 51,771
4 no_profile 불멸의행복쪽지보내기 자기소개 아이디로 검색 전체게시물 36,923
5 서번트쪽지보내기 자기소개 아이디로 검색 전체게시물 35,011
6 no_profile 닥터스쪽지보내기 자기소개 아이디로 검색 전체게시물 29,470
7 no_profile 검은고양이쪽지보내기 자기소개 아이디로 검색 전체게시물 29,077
8 no_profile Revolution쪽지보내기 자기소개 아이디로 검색 전체게시물 28,199
9 no_profile 보거스쪽지보내기 자기소개 아이디로 검색 전체게시물 26,731
10 no_profile 호롤롤로쪽지보내기 자기소개 아이디로 검색 전체게시물 17,020
알림 0