Added correct animations for alchemy if the player has a staff equipped
This commit is contained in:
@@ -2,19 +2,21 @@ package rs09.game.node.entity.skill.magic
|
||||
|
||||
import api.events.ItemAlchemizationEvent
|
||||
import api.events.TeleportEvent
|
||||
import api.EquipmentSlot
|
||||
import api.getItemFromEquipment
|
||||
import api.getAttribute
|
||||
import api.sendMessage
|
||||
import core.game.content.activity.mta.impl.GraveyardZone
|
||||
import core.game.content.global.Bones
|
||||
import core.game.interaction.MovementPulse
|
||||
import core.game.node.entity.Entity
|
||||
import core.game.node.entity.impl.Animator.Priority
|
||||
import core.game.node.entity.impl.Projectile
|
||||
import core.game.node.entity.player.Player
|
||||
import core.game.node.entity.player.link.TeleportManager
|
||||
import core.game.node.entity.player.link.audio.Audio
|
||||
import core.game.node.entity.player.link.diary.DiaryType
|
||||
import core.game.node.entity.skill.Skills
|
||||
import core.game.node.entity.skill.magic.MagicStaff
|
||||
import core.game.node.entity.skill.smithing.smelting.Bar
|
||||
import core.game.node.entity.skill.smithing.smelting.SmeltingPulse
|
||||
import core.game.node.item.Item
|
||||
@@ -45,12 +47,6 @@ class ModernListeners : SpellListener("modern"){
|
||||
private val STUN_START = Graphics(173, 96)
|
||||
private val STUN_PROJECTILE = Projectile.create(null as Entity?, null, 174, 40, 36, 52, 75, 15, 11)
|
||||
private val STUN_END = Graphics(107, 96)
|
||||
private val LOW_ANIMATION = Animation(716, Priority.HIGH)
|
||||
private val HIGH_ANIMATION = Animation(729, Priority.HIGH)
|
||||
private val LOW_ALCH_ANIM = Animation(712)
|
||||
private val LOW_ALCH_GFX = Graphics(112,5)
|
||||
private val HIGH_ALCH_ANIM = Animation(713)
|
||||
private val HIGH_ALCH_GFX = Graphics(113,5)
|
||||
private val BONE_CONVERT_GFX = Graphics(141, 96)
|
||||
private val BONE_CONVERT_ANIM = Animation(722)
|
||||
|
||||
@@ -238,24 +234,25 @@ class ModernListeners : SpellListener("modern"){
|
||||
player.pulseManager.clear()
|
||||
}
|
||||
|
||||
if(player.inventory.remove(Item(item.id,1))) {
|
||||
removeRunes(player)
|
||||
if (high) {
|
||||
visualizeSpell(player,HIGH_ALCH_ANIM,HIGH_ALCH_GFX,97)
|
||||
val weapon = player.equipment.getItem(getItemFromEquipment(player, EquipmentSlot.WEAPON))
|
||||
if (weapon != null && !weapon.equals(MagicStaff.FIRE_RUNE)) {
|
||||
player.animate(Animation(if (high) 9633 else 9625))
|
||||
player.graphics(Graphics(if (high) 1693 else 1692))
|
||||
} else {
|
||||
visualizeSpell(player,LOW_ALCH_ANIM,LOW_ALCH_GFX,98)
|
||||
player.animate(Animation(if (high) 713 else 712))
|
||||
player.graphics(Graphics(if (high) 113 else 112))
|
||||
}
|
||||
|
||||
if (coins.amount > 0)
|
||||
player.inventory.add(coins)
|
||||
|
||||
player.dispatch(ItemAlchemizationEvent(item.id, high))
|
||||
|
||||
player.inventory.remove(Item(item.id, 1))
|
||||
removeRunes(player)
|
||||
addXP(player, if (high) 65.0 else 31.0)
|
||||
showMagicTab(player)
|
||||
setDelay(player, 5)
|
||||
}
|
||||
}
|
||||
|
||||
private fun sendTeleport(player: Player, xp: Double, location: Location){
|
||||
if(player.locks.isTeleportLocked){
|
||||
|
||||
Reference in New Issue
Block a user