테스트

aion-server 4.8

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

import com.aionemu.gameserver.model.gameobjects.Creature;
import com.aionemu.gameserver.network.aion.AionConnection;
import com.aionemu.gameserver.network.aion.AionServerPacket;

/**
 * This packet show casting spell animation.
 * 
 * @author alexa026, rhys2002
 */
public class SM_CASTSPELL extends AionServerPacket {

	private final Creature effector;
	private final int spellId;
	private final int level;
	private final int targetType;
	private final int targetObjectId;
	private final int castDuration;
	private final float castSpeed;
	private final boolean allowAnimationBoostByCastSpeed;

	private float x;
	private float y;
	private float z;

	public SM_CASTSPELL(Creature effector, int spellId, int level, int targetType, int targetObjectId, int castDuration, float castSpeed, boolean allowAnimationBoostByCastSpeed) {
		this.effector = effector;
		this.spellId = spellId;
		this.level = level;
		this.targetType = targetType;
		this.targetObjectId = targetObjectId;
		this.castDuration = castDuration;
		this.castSpeed = castSpeed;
		this.allowAnimationBoostByCastSpeed = allowAnimationBoostByCastSpeed;
	}

	public SM_CASTSPELL(Creature effector, int spellId, int level, int targetType, float x, float y, float z, int castDuration, float castSpeed, boolean allowAnimationBoostByCastSpeed) {
		this(effector, spellId, level, targetType, 0, castDuration, castSpeed, allowAnimationBoostByCastSpeed);
		this.x = x;
		this.y = y;
		this.z = z;
	}

	@Override
	protected void writeImpl(AionConnection con) {
		writeD(effector.getObjectId());
		writeH(spellId);
		writeC(level);
		writeC(targetType);
		switch (targetType) {
			case 0:
			case 3:
			case 4:
				writeD(targetObjectId);
				break;
			case 1:
				writeF(x);
				writeF(y);
				writeF(z);
				break;
			case 2:
				writeF(x);
				writeF(y);
				writeF(z);
				writeD(0);// unk1
				writeD(0);// unk2
				writeD(0);// unk3
				writeD(0);// unk4
				writeD(0);// unk5
				writeD(0);// unk6
				writeD(0);// unk7
				writeD(0);// unk8
		}
		writeH(castDuration);
		writeC(0x00);// unk
		writeF(castSpeed);
		writeC(allowAnimationBoostByCastSpeed ? 1 : 0); // affects animation time of the next skill based on castSpeed (valid range: 0.5f - 1f)
	}
}

📎 첨부파일

댓글 작성 권한이 없습니다.
🏆 포인트 랭킹 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