↑ ↓

Прописать invul на время

Тема в разделе "Помощь", создана пользователем novich, 25 июн 2018.

  1. Offline

    WeRn Ефрейтор

    496
    59
    59
    Кредиты:
    $16.147,43
    Репутация:
    8
    Ну почему же на клизме, мы делали щит в миксах при ресе? И всех все устраивало.
     
  2. TopicStarter Overlay
    Offline

    novich Рядовой

    212
    1
    46
    Кредиты:
    $134,00
    Репутация:
    -2
    ну я думал создать какой-то щит, вешающий инвул, но не думаю что реализовать смогу
     
  3. Offline

    <AL>

    74
    2
    9
    Кредиты:
    $175,00
    Репутация:
    0
    Please login or register to view links
    То что выделил поменяй у себя на то что у лайтов
     
  4. Offline

    <AL>

    74
    2
    9
    Кредиты:
    $175,00
    Репутация:
    0
    У него в сборке когда идет снятие фул хп то при респе еще висит табличка "Выберите способ воскрешения" поэтому нужно поменять снятие хп на прямую смерть
     
  5. Offline

    <AL>

    74
    2
    9
    Кредиты:
    $175,00
    Репутация:
    0
    А и когда поменяешь не забудь добавить:
    if (player.isInInstance())
    PlayerReviveService.instanceRevive(player);
    else if (player.getKisk() != null)
    PlayerReviveService.kiskRevive(player);
    else
    PlayerReviveService.bindRevive(player);
    return true;
     
  6. TopicStarter Overlay
    Offline

    novich Рядовой

    212
    1
    46
    Кредиты:
    $134,00
    Репутация:
    -2
    с этим не компилится
     
  7. Offline

    <AL>

    74
    2
    9
    Кредиты:
    $175,00
    Репутация:
    0
    Покажи PlayerReviveService
     
  8. TopicStarter Overlay
    Offline

    novich Рядовой

    212
    1
    46
    Кредиты:
    $134,00
    Репутация:
    -2
    мой
    Код:
    	public static boolean calculateFallDamage(Player player, float distance, boolean stoped) {
    		if (player.isInvul()) {
    			return false;
    		}
    
    		if (distance >= FallDamageConfig.MAXIMUM_DISTANCE_DAMAGE || !stoped) {
    			player.getController().onStopMove();
    			player.getFlyController().onStopGliding(false);
    			player.getLifeStats().reduceHp(player.getLifeStats().getMaxHp() + 1, player);
    			return true;
    		} else if (distance >= FallDamageConfig.MINIMUM_DISTANCE_DAMAGE) {
    			float dmgPerMeter = player.getLifeStats().getMaxHp() * FallDamageConfig.FALL_DAMAGE_PERCENTAGE / 100f;
    			int damage = (int) (distance * dmgPerMeter);
    			player.getLifeStats().reduceHp(damage, player);
    			PacketSendUtility.sendPacket(player, new SM_ATTACK_STATUS(player, SM_ATTACK_STATUS.TYPE.FALL_DAMAGE, 0, -damage));
    		}
    
    		return false;
    	}
    лайты
    Код:
    	public static boolean calculateFallDamage(Player player, float distance, boolean stoped) {
    		if (player.isInvul()) {
    			return false;
    		}
    
    		if (distance >= FallDamageConfig.MAXIMUM_DISTANCE_DAMAGE || !stoped) {
    			player.getController().onStopMove();
    			player.getFlyController().onStopGliding(false);
    			//TODO [AT] don't call onDie directly - better reduce HP!
    			player.getController().onDie(player, false);
    
    			if (player.isInInstance())
    				PlayerReviveService.instanceRevive(player);
    			else if (player.getKisk() != null)
    				PlayerReviveService.kiskRevive(player);
    			else
    				PlayerReviveService.bindRevive(player);
    			return true;
    		}
    		else if (distance >= FallDamageConfig.MINIMUM_DISTANCE_DAMAGE) {
    			float dmgPerMeter = player.getLifeStats().getMaxHp() * FallDamageConfig.FALL_DAMAGE_PERCENTAGE / 100f;
    			int damage = (int) (distance * dmgPerMeter);
    
    			player.getLifeStats().reduceHp(damage, player);
    			PacketSendUtility.sendPacket(player, new SM_ATTACK_STATUS(player, SM_ATTACK_STATUS.TYPE.FALL_DAMAGE, 0, -damage));
    		}
    
    		return false;
    	}
    Метод лайтов не компилится, ругается на строки
    if (player.isInInstance())
    PlayerReviveService.instanceRevive(player);
    else if (player.getKisk() != null)
    PlayerReviveService.kiskRevive(player);
    else
    PlayerReviveService.bindRevive(player);
    return true;
     
  9. Offline

    <AL>

    74
    2
    9
    Кредиты:
    $175,00
    Репутация:
    0
    У тебя в PlayerReviveService отличается его покажи
     
  10. TopicStarter Overlay
    Offline

    novich Рядовой

    212
    1
    46
    Кредиты:
    $134,00
    Репутация:
    -2
    да 1в1 вроде 10 раз проверил.
    мой
    Код:
    package com.aionemu.gameserver.services.player;
    
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    
    import com.aionemu.gameserver.configs.administration.AdminConfig;
    import com.aionemu.gameserver.model.EmotionType;
    import com.aionemu.gameserver.model.gameobjects.Item;
    import com.aionemu.gameserver.model.gameobjects.Kisk;
    import com.aionemu.gameserver.model.gameobjects.player.Player;
    import com.aionemu.gameserver.model.gameobjects.state.CreatureState;
    import com.aionemu.gameserver.network.aion.serverpackets.SM_EMOTION;
    import com.aionemu.gameserver.network.aion.serverpackets.SM_ITEM_USAGE_ANIMATION;
    import com.aionemu.gameserver.network.aion.serverpackets.SM_MOTION;
    import com.aionemu.gameserver.network.aion.serverpackets.SM_PLAYER_INFO;
    import com.aionemu.gameserver.network.aion.serverpackets.SM_SYSTEM_MESSAGE;
    import com.aionemu.gameserver.services.teleport.TeleportService;
    import com.aionemu.gameserver.taskmanager.tasks.TeamMoveUpdater;
    import com.aionemu.gameserver.utils.audit.AuditLogger;
    import com.aionemu.gameserver.utils.PacketSendUtility;
    import com.aionemu.gameserver.world.World;
    import com.aionemu.gameserver.world.WorldMap;
    import com.aionemu.gameserver.world.WorldPosition;
    
    /**
     * @author Jego, xTz
     */
    public class PlayerReviveService {
    	
    	private static final Logger log = LoggerFactory.getLogger(PlayerReviveService.class);
     
    	public static final void duelRevive(Player player) {
    		revive(player, 30, 30, false);
    		PacketSendUtility.broadcastPacket(player, new SM_EMOTION(player, EmotionType.RESURRECT), true);
    		player.getGameStats().updateStatsAndSpeedVisually();
    		player.unsetResPosState();
    	}
    
    	public static final void skillRevive(Player player) {
    		if (!(player.getResStatus())) {
    			cancelRes(player);
    			return;
    		}
    
    		player.setTelEffect(2);
    		boolean isFlyingBeforeDeath = player.getIsFlyingBeforeDeath();
    		revive(player, 10, 10, true);
    		
    		if (isFlyingBeforeDeath)
    			player.setState(CreatureState.FLYING);
    		
    		PacketSendUtility.broadcastPacket(player, new SM_EMOTION(player, EmotionType.RESURRECT), true);
    		PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_REBIRTH_MASSAGE_ME);
    
    		player.getGameStats().updateStatsAndSpeedVisually();
    		
    		if (player.isInPrison())
    			TeleportService.teleportToPrison(player);
    
    		if (player.isInResPostState())
    			TeleportService.teleportTo(player, player.getWorldId(), player.getInstanceId(), player.getResPosX(), player.getResPosY(), player.getResPosZ(), 0, true);
    		player.unsetResPosState();
    		
    		//if player was flying before res, start flying
    		if (isFlyingBeforeDeath) {
    			player.getFlyController().startFly();
    		}
    	}
    
    	public static final void rebirthRevive(Player player) {
    		if (!player.canUseRebirthRevive()) {
    			return;
    		}
    		player.setTelEffect(2);
    		if (player.getRebirthResurrectPercent() <= 0) {
    			PacketSendUtility.sendMessage(player, "Error: Rebirth effect missing percent.");
    			player.setRebirthResurrectPercent(5);
    		}
    		boolean soulSickness = true;
    		int rebirthResurrectPercent = player.getRebirthResurrectPercent();
    		if(player.getAccessLevel() >= AdminConfig.ADMIN_AUTO_RES) {
    			rebirthResurrectPercent = 100;
    			soulSickness = false;
    		}
    		boolean isFlyingBeforeDeath = player.getIsFlyingBeforeDeath();
    		revive(player, rebirthResurrectPercent, rebirthResurrectPercent, soulSickness);
    		
    		if (isFlyingBeforeDeath)
    			player.setState(CreatureState.FLYING);
    		PacketSendUtility.broadcastPacket(player, new SM_EMOTION(player, EmotionType.RESURRECT), true);
    		PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_REBIRTH_MASSAGE_ME);
    	
    		player.getGameStats().updateStatsAndSpeedVisually();
    		
    		if (player.isInPrison())
    			TeleportService.teleportToPrison(player);
    		player.unsetResPosState();
    		
    		//if player was flying before res, start flying
    		if (isFlyingBeforeDeath) {
    			player.getFlyController().startFly();
    		}
    	}
    	
    	public static final void bindRevive(Player player) {
    		player.setTelEffect(4);
    		revive(player, 25, 25, true);
    		PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_REBIRTH_MASSAGE_ME);
    		// TODO: It is not always necessary.
    		// sendPacket(new SM_QUEST_LIST(activePlayer));
    		player.getGameStats().updateStatsAndSpeedVisually();	   
    		PacketSendUtility.sendPacket(player, new SM_PLAYER_INFO(player, false));
    		PacketSendUtility.sendPacket(player, new SM_MOTION(player.getObjectId(), player.getMotions().getActiveMotions()));
    		if (player.isInPrison())
    			TeleportService.teleportToPrison(player);
    		else
    			TeleportService.moveToBindLocation(player, true);
    		player.unsetResPosState();
    	}
    
    	public static final void kiskRevive(Player player) {
    		Kisk kisk = player.getKisk();
    		if (kisk == null) {
    			return;
    		}
    		player.setTelEffect(2);
    		if (player.isInPrison())
    			TeleportService.teleportToPrison(player);
    		else if (kisk.isActive()) {
    			WorldPosition bind = kisk.getPosition();
    			kisk.resurrectionUsed(player);
    			PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_REBIRTH_MASSAGE_ME);
    			revive(player, 25, 25, false);
    			player.getGameStats().updateStatsAndSpeedVisually();
    			//PacketSendUtility.sendPacket(player, new SM_PLAYER_INFO(player, false)); // send by TeleportService
    			//PacketSendUtility.sendPacket(player, new SM_MOTION(player.getObjectId(), player.getMotions().getActiveMotions())); // send by TeleportService
    			player.unsetResPosState();
    			TeleportService.moveToKiskLocation(player, bind);		   
    		}
    	}
    
    	public static final void instanceRevive(Player player) {
    		// Revive in Instances
    		try {
    			if (player.getPosition().getWorldMapInstance().getInstanceHandler().onReviveEvent(player)) {
    				return;
    			}
    		} catch (Exception ex) {
    			log.warn("[PlayerReviveService] Error call onReviveEvent player: " + player.getName());
    			bindRevive(player);
    			return;
    		}
    		WorldMap map = World.getInstance().getWorldMap(player.getWorldId());
    		if (map == null) {
    			bindRevive(player);
    			return;
    		}
    		player.setTelEffect(4);
    		revive(player, 25, 25, true);
    		PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_REBIRTH_MASSAGE_ME);
    		player.getGameStats().updateStatsAndSpeedVisually();
    		PacketSendUtility.sendPacket(player, new SM_PLAYER_INFO(player, false));
    		PacketSendUtility.sendPacket(player, new SM_MOTION(player.getObjectId(), player.getMotions().getActiveMotions()));
    		if (map.isInstanceType()
    			&& (player.getInstanceStartPosX() != 0 && player.getInstanceStartPosY() != 0 && player.getInstanceStartPosZ() != 0)) {
    			TeleportService.teleportTo(player, player.getWorldId(), player.getInstanceStartPosX(),
    				player.getInstanceStartPosY(), player.getInstanceStartPosZ(), 0);
    		}
    		else {
    			bindRevive(player);
    		}
    		player.unsetResPosState();
    			  
    	}
    
    	public static final void revive(Player player, int hpPercent, int mpPercent, boolean setSoulsickness) {
    		player.setPlayerResActivate(false);
    		player.getLifeStats().setCurrentHpPercent(hpPercent);
    		player.getLifeStats().setCurrentMpPercent(mpPercent);
    		if (player.getCommonData().getDp() > 0)
    			player.getCommonData().setDp(0);
    		player.getLifeStats().triggerRestoreOnRevive();
    		if (setSoulsickness) {
    			player.getController().updateSoulSickness();
    		}
    		player.getAggroList().clear();
    		player.getController().onBeforeSpawn();
    		//unset isflyingbeforedeath
    		player.setIsFlyingBeforeDeath(false);
    		if(player.isInGroup2()){
    			TeamMoveUpdater.getInstance().startTask(player);
    		}
    		//PacketSendUtility.sendPacket(player, new SM_EMOTION(player, EmotionType.RESURRECT));
    
    	}
    
    	public static final void itemSelfRevive(Player player) {
    		Item item = player.getSelfRezStone();
    		if (item == null) {
    			cancelRes(player);
    			return;
    		}
    
    		// Add Cooldown and use item
    		int useDelay = item.getItemTemplate().getDelayTime();
    		player.addItemCoolDown(item.getItemTemplate().getDelayId(), System.currentTimeMillis() + useDelay, useDelay / 1000);
    		player.getController().cancelUseItem();
    		PacketSendUtility.broadcastPacket(player, new SM_ITEM_USAGE_ANIMATION(player.getObjectId(), item.getObjectId(),
    			item.getItemTemplate().getTemplateId()), true);
    		if (!player.getInventory().decreaseByObjectId(item.getObjectId(), 1)) {
    			cancelRes(player);
    			return;
    		}
    		boolean isFlyingBeforeDeath = player.getIsFlyingBeforeDeath();	   
    		// Tombstone Self-Rez retail verified 15%
    		revive(player, 15, 15, true);
    		
    		if (isFlyingBeforeDeath)
    			player.setState(CreatureState.FLYING);
    
    		PacketSendUtility.broadcastPacket(player, new SM_EMOTION(player, EmotionType.RESURRECT), true);
    		PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_REBIRTH_MASSAGE_ME);
    		
    		player.getGameStats().updateStatsAndSpeedVisually();
    		
    		if (player.isInPrison())
    			TeleportService.teleportToPrison(player);
    		player.unsetResPosState();
    		
    		//if player was flying before res, start flying
    		if (isFlyingBeforeDeath) {
    			player.getFlyController().startFly();
    		}
    	}
    
    	private static final void cancelRes(Player player) {
    		AuditLogger.info(player, "Possible selfres hack.");
    		player.getController().sendDie();
    	}
    		
    }
    
    лайты
    Код:
    package com.aionemu.gameserver.services.player;
    
    import com.aionemu.gameserver.configs.administration.AdminConfig;
    import com.aionemu.gameserver.model.EmotionType;
    import com.aionemu.gameserver.model.gameobjects.Item;
    import com.aionemu.gameserver.model.gameobjects.Kisk;
    import com.aionemu.gameserver.model.gameobjects.player.Player;
    import com.aionemu.gameserver.model.gameobjects.state.CreatureState;
    import com.aionemu.gameserver.network.aion.serverpackets.SM_EMOTION;
    import com.aionemu.gameserver.network.aion.serverpackets.SM_ITEM_USAGE_ANIMATION;
    import com.aionemu.gameserver.network.aion.serverpackets.SM_MOTION;
    import com.aionemu.gameserver.network.aion.serverpackets.SM_PLAYER_INFO;
    import com.aionemu.gameserver.network.aion.serverpackets.SM_SYSTEM_MESSAGE;
    import com.aionemu.gameserver.services.teleport.TeleportService;
    import com.aionemu.gameserver.taskmanager.tasks.TeamMoveUpdater;
    import com.aionemu.gameserver.utils.audit.AuditLogger;
    import com.aionemu.gameserver.utils.PacketSendUtility;
    import com.aionemu.gameserver.world.World;
    import com.aionemu.gameserver.world.WorldMap;
    import com.aionemu.gameserver.world.WorldPosition;
    
    /**
     * @author Jego, xTz
     */
    public class PlayerReviveService {
     
    	public static final void duelRevive(Player player) {
    		revive(player, 30, 30, false);
    		PacketSendUtility.broadcastPacket(player, new SM_EMOTION(player, EmotionType.RESURRECT), true);
    		player.getGameStats().updateStatsAndSpeedVisually();
    		player.unsetResPosState();
    	}
    
    	public static final void skillRevive(Player player) {
    		if (!(player.getResStatus())) {
    			cancelRes(player);
    			return;
    		}
    
    		player.setTelEffect(2);
    		boolean isFlyingBeforeDeath = player.getIsFlyingBeforeDeath();
    		revive(player, 10, 10, true);
    		
    		if (isFlyingBeforeDeath)
    			player.setState(CreatureState.FLYING);
    		
    		PacketSendUtility.broadcastPacket(player, new SM_EMOTION(player, EmotionType.RESURRECT), true);
    		PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_REBIRTH_MASSAGE_ME);
    
    		player.getGameStats().updateStatsAndSpeedVisually();
    		
    		if (player.isInPrison())
    			TeleportService.teleportToPrison(player);
    
    		if (player.isInResPostState())
    			TeleportService.teleportTo(player, player.getWorldId(), player.getInstanceId(), player.getResPosX(), player.getResPosY(), player.getResPosZ(), 0, true);
    		player.unsetResPosState();
    		
    		//if player was flying before res, start flying
    		if (isFlyingBeforeDeath) {
    			player.getFlyController().startFly();
    		}
    	}
    
    	public static final void rebirthRevive(Player player) {
    		if (!player.canUseRebirthRevive()) {
    			return;
    		}
    		player.setTelEffect(2);
    		if (player.getRebirthResurrectPercent() <= 0) {
    			PacketSendUtility.sendMessage(player, "Error: Rebirth effect missing percent.");
    			player.setRebirthResurrectPercent(5);
    		}
    		boolean soulSickness = true;
    		int rebirthResurrectPercent = player.getRebirthResurrectPercent();
    		if(player.getAccessLevel() >= AdminConfig.ADMIN_AUTO_RES) {
    			rebirthResurrectPercent = 100;
    			soulSickness = false;
    		}
    		boolean isFlyingBeforeDeath = player.getIsFlyingBeforeDeath();
    		revive(player, rebirthResurrectPercent, rebirthResurrectPercent, soulSickness);
    		
    		if (isFlyingBeforeDeath)
    			player.setState(CreatureState.FLYING);
    		PacketSendUtility.broadcastPacket(player, new SM_EMOTION(player, EmotionType.RESURRECT), true);
    		PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_REBIRTH_MASSAGE_ME);
    	
    		player.getGameStats().updateStatsAndSpeedVisually();
    		
    		if (player.isInPrison())
    			TeleportService.teleportToPrison(player);
    		player.unsetResPosState();
    		
    		//if player was flying before res, start flying
    		if (isFlyingBeforeDeath) {
    			player.getFlyController().startFly();
    		}
    	}
    	
    	public static final void bindRevive(Player player) {
    		player.setTelEffect(4);
    		revive(player, 25, 25, true);
    		PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_REBIRTH_MASSAGE_ME);
    		// TODO: It is not always necessary.
    		// sendPacket(new SM_QUEST_LIST(activePlayer));
    		player.getGameStats().updateStatsAndSpeedVisually();	   
    		PacketSendUtility.sendPacket(player, new SM_PLAYER_INFO(player, false));
    		PacketSendUtility.sendPacket(player, new SM_MOTION(player.getObjectId(), player.getMotions().getActiveMotions()));
    		if (player.isInPrison())
    			TeleportService.teleportToPrison(player);
    		else
    			TeleportService.moveToBindLocation(player, true);
    		player.unsetResPosState();
    	}
    
    	public static final void kiskRevive(Player player) {
    		Kisk kisk = player.getKisk();
    		if (kisk == null) {
    			return;
    		}
    		player.setTelEffect(2);
    		if (player.isInPrison())
    			TeleportService.teleportToPrison(player);
    		else if (kisk.isActive()) {
    			WorldPosition bind = kisk.getPosition();
    			kisk.resurrectionUsed(player);
    			PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_REBIRTH_MASSAGE_ME);
    			revive(player, 25, 25, false);
    			player.getGameStats().updateStatsAndSpeedVisually();
    			//PacketSendUtility.sendPacket(player, new SM_PLAYER_INFO(player, false)); // send by TeleportService
    			//PacketSendUtility.sendPacket(player, new SM_MOTION(player.getObjectId(), player.getMotions().getActiveMotions())); // send by TeleportService
    			player.unsetResPosState();
    			TeleportService.moveToKiskLocation(player, bind);
    		}
    	}
    
    	public static final void instanceRevive(Player player) {
    		// Revive in Instances
    		if (player.getPosition().getWorldMapInstance().getInstanceHandler().onReviveEvent(player)) {
    			return;
    		}
    		WorldMap map = World.getInstance().getWorldMap(player.getWorldId());
    		if (map == null) {
    			bindRevive(player);
    			return;
    		}
    		player.setTelEffect(4);
    		revive(player, 25, 25, true);
    		PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_REBIRTH_MASSAGE_ME);
    		player.getGameStats().updateStatsAndSpeedVisually();
    		PacketSendUtility.sendPacket(player, new SM_PLAYER_INFO(player, false));
    		PacketSendUtility.sendPacket(player, new SM_MOTION(player.getObjectId(), player.getMotions().getActiveMotions()));
    		if (map.isInstanceType()
    			&& (player.getInstanceStartPosX() != 0 && player.getInstanceStartPosY() != 0 && player.getInstanceStartPosZ() != 0)) {
    			TeleportService.teleportTo(player, player.getWorldId(), player.getInstanceStartPosX(),
    				player.getInstanceStartPosY(), player.getInstanceStartPosZ(), 0);
    		}
    		else {
    			bindRevive(player);
    		}
    		player.unsetResPosState();
    			  
    	}
    
    	public static final void revive(Player player, int hpPercent, int mpPercent, boolean setSoulsickness) {
    		player.setPlayerResActivate(false);
    		player.getLifeStats().setCurrentHpPercent(hpPercent);
    		player.getLifeStats().setCurrentMpPercent(mpPercent);
    		if (player.getCommonData().getDp() > 0)
    			player.getCommonData().setDp(0);
    		player.getLifeStats().triggerRestoreOnRevive();
    		if (setSoulsickness) {
    			player.getController().updateSoulSickness();
    		}
    		player.getAggroList().clear();
    		player.getController().onBeforeSpawn();
    		//unset isflyingbeforedeath
    		player.setIsFlyingBeforeDeath(false);
    		if(player.isInGroup2()){
    			TeamMoveUpdater.getInstance().startTask(player);
    		}
    	}
    
    	public static final void itemSelfRevive(Player player) {
    		Item item = player.getSelfRezStone();
    		if (item == null) {
    			cancelRes(player);
    			return;
    		}
    
    		// Add Cooldown and use item
    		int useDelay = item.getItemTemplate().getDelayTime();
    		player.addItemCoolDown(item.getItemTemplate().getDelayId(), System.currentTimeMillis() + useDelay, useDelay / 1000);
    		player.getController().cancelUseItem();
    		PacketSendUtility.broadcastPacket(player, new SM_ITEM_USAGE_ANIMATION(player.getObjectId(), item.getObjectId(),
    			item.getItemTemplate().getTemplateId()), true);
    		if (!player.getInventory().decreaseByObjectId(item.getObjectId(), 1)) {
    			cancelRes(player);
    			return;
    		}
    		boolean isFlyingBeforeDeath = player.getIsFlyingBeforeDeath();	   
    		// Tombstone Self-Rez retail verified 15%
    		revive(player, 15, 15, true);
    		
    		if (isFlyingBeforeDeath)
    			player.setState(CreatureState.FLYING);
    
    		PacketSendUtility.broadcastPacket(player, new SM_EMOTION(player, EmotionType.RESURRECT), true);
    		PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_REBIRTH_MASSAGE_ME);
    		
    		player.getGameStats().updateStatsAndSpeedVisually();
    		
    		if (player.isInPrison())
    			TeleportService.teleportToPrison(player);
    		player.unsetResPosState();
    		
    		//if player was flying before res, start flying
    		if (isFlyingBeforeDeath) {
    			player.getFlyController().startFly();
    		}
    	}
    
    	private static final void cancelRes(Player player) {
    		AuditLogger.info(player, "Possible selfres hack.");
    		player.getController().sendDie();
    	}
    		
    }
    
     
  11. Offline

    <AL>

    74
    2
    9
    Кредиты:
    $175,00
    Репутация:
    0
    тогда ошибку скинь на что ругается
     
  12. TopicStarter Overlay
    Offline

    novich Рядовой

    212
    1
    46
    Кредиты:
    $134,00
    Репутация:
    -2
    а нет, на 11 раз увидел кое-что)))
     
  13. Offline

    <AL>

    74
    2
    9
    Кредиты:
    $175,00
    Репутация:
    0
    Тебе в ошибке конкретно пишет на что ругается саму ошибку скинь экстрасенсов тут нет
     
  14. TopicStarter Overlay
    Offline

    novich Рядовой

    212
    1
    46
    Кредиты:
    $134,00
    Репутация:
    -2
    Метод лайтов не компилится, ругается на строки
    if (player.isInInstance())
    PlayerReviveService.instanceRevive(player);
    else if (player.getKisk() != null)
    PlayerReviveService.kiskRevive(player);
    else
    PlayerReviveService.bindRevive(player);
    return true;

    вот мой:
    Код:
    public static final void instanceRevive(Player player) {
    		// Revive in Instances
    		try {
    			if (player.getPosition().getWorldMapInstance().getInstanceHandler().onReviveEvent(player)) {
    				return;
    			}
    		} catch (Exception ex) {
    			log.warn("[PlayerReviveService] Error call onReviveEvent player: " + player.getName());
    			bindRevive(player);
    			return;
    		}
    		WorldMap map = World.getInstance().getWorldMap(player.getWorldId());
    		if (map == null) {
    			bindRevive(player);
    			return;
    		}
    		player.setTelEffect(4);
    		revive(player, 25, 25, true);
    		PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_REBIRTH_MASSAGE_ME);
    		player.getGameStats().updateStatsAndSpeedVisually();
    		PacketSendUtility.sendPacket(player, new SM_PLAYER_INFO(player, false));
    		PacketSendUtility.sendPacket(player, new SM_MOTION(player.getObjectId(), player.getMotions().getActiveMotions()));
    		if (map.isInstanceType()
    			&& (player.getInstanceStartPosX() != 0 && player.getInstanceStartPosY() != 0 && player.getInstanceStartPosZ() != 0)) {
    			TeleportService.teleportTo(player, player.getWorldId(), player.getInstanceStartPosX(),
    				player.getInstanceStartPosY(), player.getInstanceStartPosZ(), 0);
    		}
    		else {
    			bindRevive(player);
    		}
    		player.unsetResPosState();
    			  
    	}
    Вот отличие лайтов

    Код:
    public static final void instanceRevive(Player player) {
    		// Revive in Instances
    		if (player.getPosition().getWorldMapInstance().getInstanceHandler().onReviveEvent(player)) {
    			return;
    		}
    		WorldMap map = World.getInstance().getWorldMap(player.getWorldId());
    		if (map == null) {
    			bindRevive(player);
    			return;
    		}
    		player.setTelEffect(4);
    		revive(player, 25, 25, true);
    		PacketSendUtility.sendPacket(player, SM_SYSTEM_MESSAGE.STR_REBIRTH_MASSAGE_ME);
    		player.getGameStats().updateStatsAndSpeedVisually();
    		PacketSendUtility.sendPacket(player, new SM_PLAYER_INFO(player, false));
    		PacketSendUtility.sendPacket(player, new SM_MOTION(player.getObjectId(), player.getMotions().getActiveMotions()));
    		if (map.isInstanceType()
    			&& (player.getInstanceStartPosX() != 0 && player.getInstanceStartPosY() != 0 && player.getInstanceStartPosZ() != 0)) {
    			TeleportService.teleportTo(player, player.getWorldId(), player.getInstanceStartPosX(),
    				player.getInstanceStartPosY(), player.getInstanceStartPosZ(), 0);
    		}
    		else {
    			bindRevive(player);
    		}
    		player.unsetResPosState();
    			  
    	}
     
  15. Offline

    <AL>

    74
    2
    9
    Кредиты:
    $175,00
    Репутация:
    0
    Импорт добавил ?? Суть в том что после того как ты помер тебе не должно идти таблички о способе воскрешения а должно сразу ресать на кибелиске эти строки за это и отвечают. Названия методов совпадают значит ошибок быть не должно, импорт проверь ты же небось в блокноте код смотришь
     
  16. TopicStarter Overlay
    Offline

    novich Рядовой

    212
    1
    46
    Кредиты:
    $134,00
    Репутация:
    -2
    Please login or register to view links
     
  17. TopicStarter Overlay
    Offline

    novich Рядовой

    212
    1
    46
    Кредиты:
    $134,00
    Репутация:
    -2
    импорт чисто 1в1
    Код:
    import com.aionemu.gameserver.configs.administration.AdminConfig;
    import com.aionemu.gameserver.model.EmotionType;
    import com.aionemu.gameserver.model.gameobjects.Item;
    import com.aionemu.gameserver.model.gameobjects.Kisk;
    import com.aionemu.gameserver.model.gameobjects.player.Player;
    import com.aionemu.gameserver.model.gameobjects.state.CreatureState;
    import com.aionemu.gameserver.network.aion.serverpackets.SM_EMOTION;
    import com.aionemu.gameserver.network.aion.serverpackets.SM_ITEM_USAGE_ANIMATION;
    import com.aionemu.gameserver.network.aion.serverpackets.SM_MOTION;
    import com.aionemu.gameserver.network.aion.serverpackets.SM_PLAYER_INFO;
    import com.aionemu.gameserver.network.aion.serverpackets.SM_SYSTEM_MESSAGE;
    import com.aionemu.gameserver.services.teleport.TeleportService;
    import com.aionemu.gameserver.taskmanager.tasks.TeamMoveUpdater;
    import com.aionemu.gameserver.utils.audit.AuditLogger;
    import com.aionemu.gameserver.utils.PacketSendUtility;
    import com.aionemu.gameserver.world.World;
    import com.aionemu.gameserver.world.WorldMap;
    import com.aionemu.gameserver.world.WorldPosition;
    
     
  18. TopicStarter Overlay
    Offline

    novich Рядовой

    212
    1
    46
    Кредиты:
    $134,00
    Репутация:
    -2
    А, в statfunction добавить надо же
     
  19. Offline

    <AL>

    74
    2
    9
    Кредиты:
    $175,00
    Репутация:
    0
    Добавь import com.aionemu.gameserver.services.player.PlayerReviveService;
     
  20. TopicStarter Overlay
    Offline

    novich Рядовой

    212
    1
    46
    Кредиты:
    $134,00
    Репутация:
    -2
    да, сделал. запускаю клиент