mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-23 04:57:18 +00:00
fix
This commit is contained in:
parent
5eeea84f8e
commit
1c15dd3c32
@ -21,7 +21,7 @@ public class GiveAllCommand implements CommandHandler {
|
||||
int target,amount=99999;
|
||||
|
||||
switch (args.size()) {
|
||||
default: // giveall *no args*
|
||||
default: // *no args*
|
||||
try {
|
||||
target = sender.getUid();
|
||||
}catch (NullPointerException ignored){
|
||||
@ -37,7 +37,7 @@ public class GiveAllCommand implements CommandHandler {
|
||||
return;
|
||||
}
|
||||
}catch (NumberFormatException ignored){
|
||||
CommandHandler.sendMessage(sender, "Invalid amount or player ID.");
|
||||
CommandHandler.sendMessage(sender, "Invalid player ID.");
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@ -85,19 +85,11 @@ public class GiveAllCommand implements CommandHandler {
|
||||
}
|
||||
player.getInventory().addItems(genshinItemList);
|
||||
|
||||
for(AvatarData avatarData:GenshinData.getAvatarDataMap().values())
|
||||
{
|
||||
int ascension;
|
||||
int level = 90;
|
||||
for(AvatarData avatarData:GenshinData.getAvatarDataMap().values()) {
|
||||
// Calculate ascension level.
|
||||
if (level <= 40) {
|
||||
ascension = (int) Math.ceil(90 / 20f);
|
||||
} else {
|
||||
ascension = (int) Math.ceil(90 / 10f) - 3;
|
||||
}
|
||||
|
||||
int ascension = (int) Math.ceil(90 / 10f) - 3;
|
||||
GenshinAvatar avatar = new GenshinAvatar(avatarData);
|
||||
avatar.setLevel(level);
|
||||
avatar.setLevel(90);
|
||||
avatar.setPromoteLevel(ascension);
|
||||
for (int i = 1;i<=6;i++){
|
||||
avatar.getTalentIdList().add((avatar.getAvatarId()-10000000)*10+i);//(10000058-10000000)*10+i
|
||||
|
Loading…
Reference in New Issue
Block a user