테스트

aion-server 4.8

Gitteol
최고관리자 · 1 · 💬 0 클론/새로받기
 4.8 61f661d · 1 commits 새로받기(Pull)
game-server/data/handlers/instance/BeshmundirInstance.java
package instance;

import static com.aionemu.gameserver.network.aion.serverpackets.SM_SYSTEM_MESSAGE.STR_MSG_IDCatacombs_BigOrb_Spawn;

import java.util.concurrent.atomic.AtomicInteger;

import com.aionemu.gameserver.instance.handlers.GeneralInstanceHandler;
import com.aionemu.gameserver.instance.handlers.InstanceID;
import com.aionemu.gameserver.model.Race;
import com.aionemu.gameserver.model.gameobjects.Npc;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.network.aion.AionServerPacket;
import com.aionemu.gameserver.network.aion.serverpackets.SM_PLAY_MOVIE;
import com.aionemu.gameserver.network.aion.serverpackets.SM_QUEST_ACTION;
import com.aionemu.gameserver.network.aion.serverpackets.SM_SYSTEM_MESSAGE;
import com.aionemu.gameserver.skillengine.SkillEngine;
import com.aionemu.gameserver.utils.PacketSendUtility;
import com.aionemu.gameserver.world.WorldMapInstance;

/**
 * @author Gigi, nrg, oslo0322, xTz
 * @version TODO: Hard-/normal mode TODO: AI for each boss see http://raouooble.com/Beshmundir_Temple_Guide.html see
 *          http://gameguide.na.aiononline.com/aion/Beshmundir+Temple+Walkthrough%3A+Hard+Mode
 */
@InstanceID(300170000)
public class BeshmundirInstance extends GeneralInstanceHandler {

	private final AtomicInteger macunbello = new AtomicInteger();
	private final AtomicInteger kills = new AtomicInteger();
	private Race instanceRace;

	public BeshmundirInstance(WorldMapInstance instance) {
		super(instance);
	}

	@Override
	public void onEnterInstance(final Player player) {
		if (instanceRace == null)
			instanceRace = player.getRace();
	}

	@Override
	public float getExpMultiplier() {
		return 3f;
	}

	@Override
	public void onDie(Npc npc) {
		switch (npc.getNpcId()) {
			case 216583: // Brutal Soulwatcher (Difficult)
			case 216587: // Brutal Soulwatcher (Normal)
				spawn(799518, 936.0029f, 441.51712f, 220.5029f, (byte) 28);
				break;
			case 216584: // Brutal Soulwatcher (Difficult)
			case 216588: // Brutal Soulwatcher (Normal)
				spawn(799519, 791.0439f, 439.79608f, 220.3506f, (byte) 28);
				break;
			case 216585: // Brutal Soulwatcher (Difficult)
			case 216589: // Brutal Soulwatcher (Normal)
				spawn(799520, 820.70624f, 278.828f, 220.19385f, (byte) 55);
				break;
			case 216586: // Temadaro (Difficult)
			case 216590: // Temadaro (Normal)
				int killedCount = macunbello.getAndSet(0);
				if (killedCount < 12) {
					Npc npcMacunbello = (Npc) spawn(216735, 981.015015f, 134.373001f, 241.755005f, (byte) 30); // strongest macunbello
					SkillEngine.getInstance().applyEffectDirectly(19046, npcMacunbello, npcMacunbello);
				} else if (killedCount < 14) {
					Npc npcMacunbello = (Npc) spawn(216734, 981.015015f, 134.373001f, 241.755005f, (byte) 30); // 2nd strongest macunbello
					SkillEngine.getInstance().applyEffectDirectly(19047, npcMacunbello, npcMacunbello);
				} else if (killedCount < 21) {
					Npc npcMacunbello = (Npc) spawn(216737, 981.015015f, 134.373001f, 241.755005f, (byte) 30); // 2nd weakest macunbello
					SkillEngine.getInstance().applyEffectDirectly(19048, npcMacunbello, npcMacunbello);
				} else {
					spawn(216245, 981.015015f, 134.373001f, 241.755005f, (byte) 30); // weakest macunbello
				}
				sendPacket(new SM_QUEST_ACTION(0, 0));
				instance.setDoorState(467, true);
				break;
			case 799342:
				sendPacket(new SM_PLAY_MOVIE(false, 0, 0, 447, true));
				break;
			case 216157:
			case 216238:
				instance.setDoorState(470, true);
				spawn(216159, 1357.0598f, 388.6637f, 249.26372f, (byte) 90);
				break;
			case 216165:
			case 216246:
				instance.setDoorState(473, true);
				break;
			case 216739:
			case 216740:
				int killedTotal = kills.incrementAndGet();
				if (killedTotal < 10) {
					sendMsg(SM_SYSTEM_MESSAGE.STR_MSG_IDCatacombs_NmdSpecter_Spawn());
				} else if (killedTotal == 10) {
					sendMsg(SM_SYSTEM_MESSAGE.STR_MSG_IDCatacombs_NmdSpecter_Start());
					spawn(216158, 1356.5719f, 147.76418f, 246.27373f, (byte) 91);
				}
				break;
			case 216158:
			case 216239:
				instance.setDoorState(471, true);
				break;
			case 700608:
				if (instanceRace == Race.ASMODIANS) {
					spawn(799342, 1357.1f, 76.044f, 248.595f, (byte) 0);
				}
				break;
			case 216263:
			case 216182:
				// this is a safety Mechanism
				// super boss
				spawn(216183, 558.306f, 1369.02f, 224.795f, (byte) 70);
				// gate
				sendMsg(SM_SYSTEM_MESSAGE.STR_MSG_IDCatacombs_BigOrb_Spawn());
				spawn(730275, 1611.1266f, 1604.6935f, 310.39972f, (byte) 17, 426);
				break;
			case 216250: // Dorakiki the Bold
			case 216169:
				sendMsg(SM_SYSTEM_MESSAGE.STR_MSG_IDCatacombs_NmdShulack_Rufukin());
				spawn(216527, 1161.859985f, 1213.859985f, 284.057007f, (byte) 110); // Lupukin: cat trader
				break;
			case 216206:
			case 216207:
			case 216208:
			case 216209:
			case 216210:
			case 216211:
			case 216212:
			case 216213:
				switch (macunbello.incrementAndGet()) {
					case 12 -> sendMsg(SM_SYSTEM_MESSAGE.STR_MSG_IDCatacombs_NmdLich_weakness1());
					case 14 -> sendMsg(SM_SYSTEM_MESSAGE.STR_MSG_IDCatacombs_NmdLich_weakness2());
					case 21 -> sendMsg(SM_SYSTEM_MESSAGE.STR_MSG_IDCatacombs_NmdLich_weakness3());
				}
				break;
		}
	}

	private void sendPacket(AionServerPacket packet) {
		PacketSendUtility.broadcastToMap(instance, packet);
	}

	@Override
	public void onPlayMovieEnd(Player player, int movieId) {
		if (movieId == 443)
			PacketSendUtility.sendPacket(player, STR_MSG_IDCatacombs_BigOrb_Spawn());
	}

	@Override
	public void onInstanceCreate() {
		instance.setDoorState(535, true);
	}
}

📎 첨부파일

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