mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-12 21:34:35 +01:00
Fix and refactor random SU stuff
- Add fragments when breaking destructibles - Fix initial fragment counter - Hopefully fix closed door in some scenes - Various refactors
This commit is contained in:
@@ -57,7 +57,9 @@ public class GameConstants {
|
|||||||
// Rogue
|
// Rogue
|
||||||
public static final boolean ENABLE_ROGUE = true;
|
public static final boolean ENABLE_ROGUE = true;
|
||||||
public static final int ROGUE_ENTRANCE = 801120102;
|
public static final int ROGUE_ENTRANCE = 801120102;
|
||||||
public static final int ROGUE_TALENT_POINT_ITEM_ID = 32;
|
public static final int ROGUE_START_COIN_COUNT = 100;
|
||||||
|
public static final int ROGUE_COIN_ID = 31;
|
||||||
|
public static final int ROGUE_TALENT_COIN_ID = 32;
|
||||||
|
|
||||||
// Activity
|
// Activity
|
||||||
public static final int[] ENABLE_ACTIVITY_TYPES = { 18, 34 };
|
public static final int[] ENABLE_ACTIVITY_TYPES = { 18, 34 };
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class MazeSkillSetAttackTargetMonsterDie extends MazeSkillAction {
|
|||||||
// Rogue TODO optimize
|
// Rogue TODO optimize
|
||||||
if (caster.getOwner().getRogueInstance() != null) {
|
if (caster.getOwner().getRogueInstance() != null) {
|
||||||
caster.getOwner().getRogueInstance().createBuffSelect(1);
|
caster.getOwner().getRogueInstance().createBuffSelect(1);
|
||||||
caster.getOwner().getRogueInstance().addMoney(Utils.randomRange(20, 40));
|
caster.getOwner().getRogueInstance().addCoin(Utils.randomRange(20, 40));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,21 +102,29 @@ public class Inventory extends BasePlayerManager {
|
|||||||
// Add/Remove items
|
// Add/Remove items
|
||||||
|
|
||||||
public boolean addItem(int itemId, int count) {
|
public boolean addItem(int itemId, int count) {
|
||||||
|
return addItem(itemId, count, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean addItem(int itemId, int count, boolean showHint) {
|
||||||
ItemExcel itemExcel = GameData.getItemExcelMap().get(itemId);
|
ItemExcel itemExcel = GameData.getItemExcelMap().get(itemId);
|
||||||
|
|
||||||
if (itemExcel == null) {
|
if (itemExcel == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return addItem(itemExcel, count);
|
return addItem(itemExcel, count, showHint);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean addItem(ItemExcel itemExcel, int count) {
|
public boolean addItem(ItemExcel itemExcel, int count, boolean showHint) {
|
||||||
GameItem item = new GameItem(itemExcel, count);
|
GameItem item = new GameItem(itemExcel, count);
|
||||||
return addItem(item);
|
return addItem(item, showHint);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean addItem(GameItem item) {
|
||||||
|
return addItem(item, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean addItem(GameItem item) {
|
public boolean addItem(GameItem item, boolean showHint) {
|
||||||
// Set excel in case its missing
|
// Set excel in case its missing
|
||||||
if (item.getExcel() == null) {
|
if (item.getExcel() == null) {
|
||||||
item.setExcel(GameData.getItemExcelMap().get(item.getItemId()));
|
item.setExcel(GameData.getItemExcelMap().get(item.getItemId()));
|
||||||
@@ -126,7 +134,15 @@ public class Inventory extends BasePlayerManager {
|
|||||||
GameItem result = putItem(item);
|
GameItem result = putItem(item);
|
||||||
|
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
getPlayer().sendPacket(new PacketPlayerSyncScNotify(result));
|
// Send packets
|
||||||
|
if (item.getExcel().getItemMainType().getTabType() != InventoryTabType.NONE) {
|
||||||
|
getPlayer().sendPacket(new PacketPlayerSyncScNotify(result));
|
||||||
|
}
|
||||||
|
if (showHint) {
|
||||||
|
getPlayer().sendPacket(new PacketScenePlaneEventScNotify(item));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Success
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -296,24 +312,29 @@ public class Inventory extends BasePlayerManager {
|
|||||||
|
|
||||||
private void addVirtualItem(int itemId, int count) {
|
private void addVirtualItem(int itemId, int count) {
|
||||||
switch (itemId) {
|
switch (itemId) {
|
||||||
case 1: // Stellar Jade
|
case 1: // Stellar Jade
|
||||||
getPlayer().addHCoin(count);
|
getPlayer().addHCoin(count);
|
||||||
break;
|
break;
|
||||||
case 2: // Credit
|
case 2: // Credit
|
||||||
getPlayer().addSCoin(count);
|
getPlayer().addSCoin(count);
|
||||||
break;
|
break;
|
||||||
case 3: // Oneiric Shard
|
case 3: // Oneiric Shard
|
||||||
getPlayer().addMCoin(count);
|
getPlayer().addMCoin(count);
|
||||||
break;
|
break;
|
||||||
case 11: // Trailblaze Power
|
case 11: // Trailblaze Power
|
||||||
getPlayer().addStamina(count);
|
getPlayer().addStamina(count);
|
||||||
break;
|
break;
|
||||||
case 22: // Trailblaze EXP
|
case 22: // Trailblaze EXP
|
||||||
getPlayer().addExp(count);
|
getPlayer().addExp(count);
|
||||||
break;
|
break;
|
||||||
case GameConstants.ROGUE_TALENT_POINT_ITEM_ID: // Rogue talent points
|
case GameConstants.ROGUE_TALENT_COIN_ID: // Rogue talent points
|
||||||
getPlayer().addTalentPoints(count);
|
getPlayer().addTalentPoints(count);
|
||||||
break;
|
break;
|
||||||
|
case GameConstants.ROGUE_COIN_ID:
|
||||||
|
if (getPlayer().getRogueInstance() != null) {
|
||||||
|
getPlayer().getRogueInstance().setCoin(getPlayer().getRogueInstance().getCoin() + count);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -341,7 +362,7 @@ public class Inventory extends BasePlayerManager {
|
|||||||
// Remove credits
|
// Remove credits
|
||||||
getPlayer().addHCoin(-param.getCount() * multiplier);
|
getPlayer().addHCoin(-param.getCount() * multiplier);
|
||||||
continue;
|
continue;
|
||||||
} else if (param.getId() == GameConstants.ROGUE_TALENT_POINT_ITEM_ID) {
|
} else if (param.getId() == GameConstants.ROGUE_TALENT_COIN_ID) {
|
||||||
// Remove credits
|
// Remove credits
|
||||||
getPlayer().addTalentPoints(-param.getCount() * multiplier);
|
getPlayer().addTalentPoints(-param.getCount() * multiplier);
|
||||||
continue;
|
continue;
|
||||||
@@ -469,7 +490,7 @@ public class Inventory extends BasePlayerManager {
|
|||||||
if (!verifyHcoin(param.getCount() * multiplier)) {
|
if (!verifyHcoin(param.getCount() * multiplier)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else if (param.getId() == GameConstants.ROGUE_TALENT_POINT_ITEM_ID) {
|
} else if (param.getId() == GameConstants.ROGUE_TALENT_COIN_ID) {
|
||||||
return this.getPlayer().getTalentPoints() >= param.getCount() * multiplier;
|
return this.getPlayer().getTalentPoints() >= param.getCount() * multiplier;
|
||||||
} else {
|
} else {
|
||||||
// Check param items
|
// Check param items
|
||||||
|
|||||||
@@ -1097,7 +1097,7 @@ public class Player implements Tickable {
|
|||||||
.setCurTalentCoin(this.getTalentPoints());
|
.setCurTalentCoin(this.getTalentPoints());
|
||||||
|
|
||||||
if (this.getRogueInstance() != null) {
|
if (this.getRogueInstance() != null) {
|
||||||
proto.setCurRogueCoin(this.getRogueInstance().getMoney());
|
proto.setCurRogueCoin(this.getRogueInstance().getCoin());
|
||||||
}
|
}
|
||||||
|
|
||||||
return proto;
|
return proto;
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class RogueEntityLoader extends SceneEntityLoader {
|
|||||||
PropState state = propInfo.getState();
|
PropState state = propInfo.getState();
|
||||||
PropRogueData propExtra = null;
|
PropRogueData propExtra = null;
|
||||||
|
|
||||||
// Rogue Door id is 1000
|
// Rogue portal id is 1000
|
||||||
if (propId == 1000 || propId == 1021 || propId == 1022 || propId == 1023) {
|
if (propId == 1000 || propId == 1021 || propId == 1022 || propId == 1023) {
|
||||||
// Site index
|
// Site index
|
||||||
int index = 0;
|
int index = 0;
|
||||||
@@ -101,7 +101,7 @@ public class RogueEntityLoader extends SceneEntityLoader {
|
|||||||
propId = 1000;
|
propId = 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Force rogue door to be open
|
// Force rogue portal to always be open, even if occurrences or monsters exist in the scene. TODO handle correctly
|
||||||
state = PropState.Open;
|
state = PropState.Open;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,6 +109,11 @@ public class RogueEntityLoader extends SceneEntityLoader {
|
|||||||
PropExcel propExcel = GameData.getPropExcelMap().get(propId);
|
PropExcel propExcel = GameData.getPropExcelMap().get(propId);
|
||||||
if (propExcel == null) return null;
|
if (propExcel == null) return null;
|
||||||
|
|
||||||
|
// Hacky fix to always open doors
|
||||||
|
if (propExcel.isDoor()) {
|
||||||
|
state = PropState.Open;
|
||||||
|
}
|
||||||
|
|
||||||
// Create prop from prop info
|
// Create prop from prop info
|
||||||
EntityProp prop = new EntityProp(scene, propExcel, group, propInfo);
|
EntityProp prop = new EntityProp(scene, propExcel, group, propInfo);
|
||||||
prop.setState(state, false);
|
prop.setState(state, false);
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public class RogueEventManager {
|
|||||||
IntArrayList param = event.getRogueEffectParamList();
|
IntArrayList param = event.getRogueEffectParamList();
|
||||||
|
|
||||||
switch (event.getRogueEffectType()) {
|
switch (event.getRogueEffectType()) {
|
||||||
case GetItem -> rogueInstance.addDialogueMoney(param.getInt(1));
|
case GetItem -> rogueInstance.addDialogueCoin(param.getInt(1));
|
||||||
case TriggerBattle -> {
|
case TriggerBattle -> {
|
||||||
this.getPlayer().getServer().getBattleService().startBattle(player, param.getInt(0)); // handle in SceneEnterStageCsReq
|
this.getPlayer().getServer().getBattleService().startBattle(player, param.getInt(0)); // handle in SceneEnterStageCsReq
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ public class RogueEventManager {
|
|||||||
case GetAllRogueBuffInGroupAndGetItem -> {
|
case GetAllRogueBuffInGroupAndGetItem -> {
|
||||||
var rogueBuff = GameData.getRogueBuffGroupExcelMap().get(param.getInt(0));
|
var rogueBuff = GameData.getRogueBuffGroupExcelMap().get(param.getInt(0));
|
||||||
this.getRogueInstance().addBuff(rogueBuff.getRogueBuffList());
|
this.getRogueInstance().addBuff(rogueBuff.getRogueBuffList());
|
||||||
this.getRogueInstance().addDialogueMoney(param.getInt(2));
|
this.getRogueInstance().addDialogueCoin(param.getInt(2));
|
||||||
}
|
}
|
||||||
case RepeatableGamble -> {
|
case RepeatableGamble -> {
|
||||||
var failEventId = param.getInt(0);
|
var failEventId = param.getInt(0);
|
||||||
@@ -149,8 +149,8 @@ public class RogueEventManager {
|
|||||||
if (event == null || event.getCostType() == null) return;
|
if (event == null || event.getCostType() == null) return;
|
||||||
var param = event.getCostParamList();
|
var param = event.getCostParamList();
|
||||||
switch (event.getCostType()) {
|
switch (event.getCostType()) {
|
||||||
case CostItemValue -> rogueInstance.setMoney(rogueInstance.getMoney() - param.getInt(1));
|
case CostItemValue -> rogueInstance.removeCoin(param.getInt(1));
|
||||||
case CostItemPercent -> rogueInstance.setMoney(rogueInstance.getMoney() - (rogueInstance.getMoney() * param.getInt(1) / 100));
|
case CostItemPercent -> rogueInstance.removeCoin(rogueInstance.getCoin() * param.getInt(1) / 100);
|
||||||
case CostHpCurrentPercent -> {
|
case CostHpCurrentPercent -> {
|
||||||
var lineup = this.getPlayer().getCurrentLineup();
|
var lineup = this.getPlayer().getCurrentLineup();
|
||||||
lineup.forEachAvatar(avatar -> {
|
lineup.forEachAvatar(avatar -> {
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ package emu.lunarcore.game.rogue;
|
|||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import emu.lunarcore.GameConstants;
|
||||||
import emu.lunarcore.data.GameData;
|
import emu.lunarcore.data.GameData;
|
||||||
import emu.lunarcore.data.config.AnchorInfo;
|
import emu.lunarcore.data.config.AnchorInfo;
|
||||||
import emu.lunarcore.data.excel.*;
|
import emu.lunarcore.data.excel.*;
|
||||||
import emu.lunarcore.game.battle.Battle;
|
import emu.lunarcore.game.battle.Battle;
|
||||||
import emu.lunarcore.game.enums.RogueBuffAeonType;
|
import emu.lunarcore.game.enums.RogueBuffAeonType;
|
||||||
import emu.lunarcore.game.inventory.GameItem;
|
|
||||||
import emu.lunarcore.game.player.Player;
|
import emu.lunarcore.game.player.Player;
|
||||||
import emu.lunarcore.game.player.lineup.PlayerLineup;
|
import emu.lunarcore.game.player.lineup.PlayerLineup;
|
||||||
import emu.lunarcore.proto.AvatarTypeOuterClass.AvatarType;
|
import emu.lunarcore.proto.AvatarTypeOuterClass.AvatarType;
|
||||||
@@ -67,7 +67,7 @@ public class RogueInstance {
|
|||||||
private int aeonId;
|
private int aeonId;
|
||||||
private int aeonBuffType;
|
private int aeonBuffType;
|
||||||
private int maxAeonBuffs;
|
private int maxAeonBuffs;
|
||||||
private int money; // universal debris
|
private int coin; // universal debris
|
||||||
public int actionUniqueId = 0;
|
public int actionUniqueId = 0;
|
||||||
public int eventUniqueId = 690;
|
public int eventUniqueId = 690;
|
||||||
public Int2ObjectMap<List<RogueDialogueEventParam>> curDialogueParams = new Int2ObjectOpenHashMap<>();
|
public Int2ObjectMap<List<RogueDialogueEventParam>> curDialogueParams = new Int2ObjectOpenHashMap<>();
|
||||||
@@ -90,7 +90,7 @@ public class RogueInstance {
|
|||||||
this.buffs = new HashMap<>();
|
this.buffs = new HashMap<>();
|
||||||
this.miracles = new HashMap<>();
|
this.miracles = new HashMap<>();
|
||||||
this.maxAeonBuffs = 4;
|
this.maxAeonBuffs = 4;
|
||||||
this.money = 100;
|
this.coin = 100;
|
||||||
this.eventManager = new RogueEventManager(this);
|
this.eventManager = new RogueEventManager(this);
|
||||||
|
|
||||||
if (aeonExcel != null) {
|
if (aeonExcel != null) {
|
||||||
@@ -231,9 +231,9 @@ public class RogueInstance {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public synchronized RogueBuffSelectMenu rollBuffSelect() {
|
public synchronized RogueBuffSelectMenu rollBuffSelect() {
|
||||||
if (getBuffSelect() != null && getBuffSelect().hasRerolls() && money >= 30) {
|
if (getBuffSelect() != null && getBuffSelect().hasRerolls() && coin >= 30) {
|
||||||
this.getBuffSelect().reroll();
|
this.getBuffSelect().reroll();
|
||||||
this.setMoney(money - 30);
|
this.removeCoin(30);
|
||||||
this.getPlayer().sendPacket(new PacketHandleRogueCommonPendingActionScRsp(this.getBuffSelect().toProto(), this.actionUniqueId - 2));
|
this.getPlayer().sendPacket(new PacketHandleRogueCommonPendingActionScRsp(this.getBuffSelect().toProto(), this.actionUniqueId - 2));
|
||||||
|
|
||||||
var proto = new PacketSyncRogueCommonPendingActionScNotify(this.buffSelect.toProto(), this.actionUniqueId);
|
var proto = new PacketSyncRogueCommonPendingActionScNotify(this.buffSelect.toProto(), this.actionUniqueId);
|
||||||
@@ -301,8 +301,8 @@ public class RogueInstance {
|
|||||||
var buff = this.getBuffs().get(buffId);
|
var buff = this.getBuffs().get(buffId);
|
||||||
if (buff == null) return null;
|
if (buff == null) return null;
|
||||||
var cost = 100 + (buff.getExcel().getRogueBuffRarity() - 1) * 30;
|
var cost = 100 + (buff.getExcel().getRogueBuffRarity() - 1) * 30;
|
||||||
if (this.getMoney() < cost) return null;
|
if (this.getCoin() < cost) return null;
|
||||||
this.setMoney(this.getMoney() - cost);
|
this.removeCoin(cost);
|
||||||
this.getBuffs().remove(buffId);
|
this.getBuffs().remove(buffId);
|
||||||
this.addBuff(new RogueBuffData(buff.getId(), buff.getLevel() + 1), RogueBuffSource.ROGUE_BUFF_SOURCE_TYPE_ENHANCE);
|
this.addBuff(new RogueBuffData(buff.getId(), buff.getLevel() + 1), RogueBuffSource.ROGUE_BUFF_SOURCE_TYPE_ENHANCE);
|
||||||
return RogueBuff.newInstance()
|
return RogueBuff.newInstance()
|
||||||
@@ -411,28 +411,25 @@ public class RogueInstance {
|
|||||||
return bonus;
|
return bonus;
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void setMoney(int money) {
|
/**
|
||||||
if (this.money <= money) {
|
* Sets the amount of coins the player has without showing any tooltip
|
||||||
this.getPlayer().sendPacket(new PacketScenePlaneEventScNotify(new GameItem(31, money - this.money)));
|
*/
|
||||||
}
|
public synchronized void setCoin(int amount) {
|
||||||
this.money = money;
|
this.coin = Math.max(amount, 0);
|
||||||
this.getPlayer().sendPacket(new PacketSyncRogueVirtualItemInfoScNotify(this.getPlayer()));
|
this.getPlayer().sendPacket(new PacketSyncRogueVirtualItemInfoScNotify(this.getPlayer()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void addMoney(int amount) {
|
public void addCoin(int count) {
|
||||||
this.setMoney(this.money + amount);
|
this.getPlayer().getInventory().addItem(GameConstants.ROGUE_COIN_ID, count, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void addDialogueMoney(int money) {
|
public void removeCoin(int count) {
|
||||||
this.money += money;
|
this.getPlayer().getInventory().addItem(GameConstants.ROGUE_COIN_ID, -count, true);
|
||||||
this.getPlayer().sendPacket(new PacketSyncRogueVirtualItemInfoScNotify(this.getPlayer()));
|
|
||||||
this.getPlayer().sendPacket(new PacketSyncRogueCommonActionResultScNotify(RogueBuffSource.ROGUE_BUFF_SOURCE_TYPE_DIALOGUE, money));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void addCommandMoney(int money_num) {
|
public void addDialogueCoin(int count) {
|
||||||
this.money += money_num;
|
this.addCoin(count);
|
||||||
this.getPlayer().sendPacket(new PacketSyncRogueVirtualItemInfoScNotify(this.getPlayer()));
|
this.getPlayer().sendPacket(new PacketSyncRogueCommonActionResultScNotify(RogueBuffSource.ROGUE_BUFF_SOURCE_TYPE_DIALOGUE, count));
|
||||||
this.getPlayer().sendPacket(new PacketScenePlaneEventScNotify(new GameItem(31, money)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void pickAvatar(RepeatedInt avatarId) {
|
public synchronized void pickAvatar(RepeatedInt avatarId) {
|
||||||
@@ -600,7 +597,7 @@ public class RogueInstance {
|
|||||||
} else {
|
} else {
|
||||||
this.createBuffSelect(amount);
|
this.createBuffSelect(amount);
|
||||||
}
|
}
|
||||||
this.addMoney(Utils.randomRange(20, 40) * amount);
|
this.addCoin(Utils.randomRange(20, 40) * amount);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.getPlayer().getRogueManager().quitRogue();
|
this.getPlayer().getRogueManager().quitRogue();
|
||||||
@@ -736,7 +733,7 @@ public class RogueInstance {
|
|||||||
|
|
||||||
public RogueVirtualItemInfo toRogueVirtualItemProto() {
|
public RogueVirtualItemInfo toRogueVirtualItemProto() {
|
||||||
var proto = RogueVirtualItemInfo.newInstance()
|
var proto = RogueVirtualItemInfo.newInstance()
|
||||||
.setRogueCoin(this.getMoney());
|
.setRogueCoin(this.getCoin());
|
||||||
|
|
||||||
return proto;
|
return proto;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import emu.lunarcore.server.packet.CmdId;
|
|||||||
import emu.lunarcore.server.packet.send.PacketLeaveRogueScRsp;
|
import emu.lunarcore.server.packet.send.PacketLeaveRogueScRsp;
|
||||||
import emu.lunarcore.server.packet.send.PacketStartRogueScRsp;
|
import emu.lunarcore.server.packet.send.PacketStartRogueScRsp;
|
||||||
import emu.lunarcore.server.packet.send.PacketSyncRogueFinishScNotify;
|
import emu.lunarcore.server.packet.send.PacketSyncRogueFinishScNotify;
|
||||||
|
import emu.lunarcore.server.packet.send.PacketSyncRogueVirtualItemInfoScNotify;
|
||||||
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
|
import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
|
||||||
import it.unimi.dsi.fastutil.ints.IntSet;
|
import it.unimi.dsi.fastutil.ints.IntSet;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@@ -129,6 +130,7 @@ public class RogueManager extends BasePlayerManager {
|
|||||||
|
|
||||||
// Done
|
// Done
|
||||||
getPlayer().sendPacket(new PacketStartRogueScRsp(getPlayer()));
|
getPlayer().sendPacket(new PacketStartRogueScRsp(getPlayer()));
|
||||||
|
getPlayer().sendPacket(new PacketSyncRogueVirtualItemInfoScNotify(getPlayer())); // Hacky fix to show coin amount
|
||||||
}
|
}
|
||||||
|
|
||||||
public void leaveRogue() {
|
public void leaveRogue() {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package emu.lunarcore.game.scene.entity;
|
|||||||
import emu.lunarcore.data.config.GroupInfo;
|
import emu.lunarcore.data.config.GroupInfo;
|
||||||
import emu.lunarcore.data.config.PropInfo;
|
import emu.lunarcore.data.config.PropInfo;
|
||||||
import emu.lunarcore.data.excel.PropExcel;
|
import emu.lunarcore.data.excel.PropExcel;
|
||||||
|
import emu.lunarcore.game.enums.PlaneType;
|
||||||
import emu.lunarcore.game.enums.PropState;
|
import emu.lunarcore.game.enums.PropState;
|
||||||
import emu.lunarcore.game.enums.PropType;
|
import emu.lunarcore.game.enums.PropType;
|
||||||
import emu.lunarcore.game.scene.Scene;
|
import emu.lunarcore.game.scene.Scene;
|
||||||
@@ -12,6 +13,7 @@ import emu.lunarcore.proto.SceneEntityInfoOuterClass.SceneEntityInfo;
|
|||||||
import emu.lunarcore.proto.ScenePropInfoOuterClass.ScenePropInfo;
|
import emu.lunarcore.proto.ScenePropInfoOuterClass.ScenePropInfo;
|
||||||
import emu.lunarcore.server.packet.send.PacketSceneGroupRefreshScNotify;
|
import emu.lunarcore.server.packet.send.PacketSceneGroupRefreshScNotify;
|
||||||
import emu.lunarcore.util.Position;
|
import emu.lunarcore.util.Position;
|
||||||
|
import emu.lunarcore.util.Utils;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
@@ -91,6 +93,11 @@ public class EntityProp implements GameEntity {
|
|||||||
scene.getPlayer().getCurrentLineup().addMp(2);
|
scene.getPlayer().getCurrentLineup().addMp(2);
|
||||||
} else if (excel.isRecoverHp()) {
|
} else if (excel.isRecoverHp()) {
|
||||||
scene.getPlayer().getCurrentLineup().heal(2500, false);
|
scene.getPlayer().getCurrentLineup().heal(2500, false);
|
||||||
|
} else {
|
||||||
|
// Add SU coins if prop isnt a healing/technique restore prop
|
||||||
|
if (scene.getPlaneType() == PlaneType.Rogue && scene.getPlayer().getRogueInstance() != null) {
|
||||||
|
scene.getPlayer().getRogueInstance().addCoin(Utils.randomRange(10, 15) * 2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
package emu.lunarcore.server.packet.recv;
|
|
||||||
|
|
||||||
import emu.lunarcore.server.game.GameSession;
|
|
||||||
import emu.lunarcore.server.packet.CmdId;
|
|
||||||
import emu.lunarcore.server.packet.Opcodes;
|
|
||||||
import emu.lunarcore.server.packet.PacketHandler;
|
|
||||||
import emu.lunarcore.server.packet.send.PacketGetChessRogueNousStoryInfoScRsp;
|
|
||||||
|
|
||||||
@Opcodes(CmdId.GetChessRogueNousStoryInfoCsReq)
|
|
||||||
public class HandlerGetChessRogueNousStoryInfoCsReq extends PacketHandler {
|
|
||||||
@Override
|
|
||||||
public void handle(GameSession session, byte[] data) throws Exception {
|
|
||||||
//session.send(new PacketGetChessRogueNousStoryInfoScRsp());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
package emu.lunarcore.server.packet.send;
|
package emu.lunarcore.server.packet.send;
|
||||||
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import emu.lunarcore.data.GameData;
|
import emu.lunarcore.data.GameData;
|
||||||
import emu.lunarcore.data.excel.RelicExcel;
|
|
||||||
import emu.lunarcore.proto.GetArchiveDataScRspOuterClass.GetArchiveDataScRsp;
|
import emu.lunarcore.proto.GetArchiveDataScRspOuterClass.GetArchiveDataScRsp;
|
||||||
import emu.lunarcore.proto.MonsterArchiveOuterClass.MonsterArchive;
|
import emu.lunarcore.proto.MonsterArchiveOuterClass.MonsterArchive;
|
||||||
import emu.lunarcore.proto.RelicArchiveOuterClass.RelicArchive;
|
import emu.lunarcore.proto.RelicArchiveOuterClass.RelicArchive;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package emu.lunarcore.server.packet.send;
|
package emu.lunarcore.server.packet.send;
|
||||||
|
|
||||||
import emu.lunarcore.LunarCore;
|
|
||||||
import emu.lunarcore.proto.RogueDialogueEventOuterClass.RogueDialogueEvent;
|
import emu.lunarcore.proto.RogueDialogueEventOuterClass.RogueDialogueEvent;
|
||||||
import emu.lunarcore.proto.RogueDialogueEventParamOuterClass.RogueDialogueEventParam;
|
import emu.lunarcore.proto.RogueDialogueEventParamOuterClass.RogueDialogueEventParam;
|
||||||
import emu.lunarcore.proto.SyncRogueDialogueEventDataScNotifyOuterClass.SyncRogueDialogueEventDataScNotify;
|
import emu.lunarcore.proto.SyncRogueDialogueEventDataScNotifyOuterClass.SyncRogueDialogueEventDataScNotify;
|
||||||
|
|||||||
Reference in New Issue
Block a user