feat: focus 2.0 #2898
@ -22,14 +22,17 @@ export const focusController: RequestHandler = async (req, res) => {
|
|||||||
case Focus2Operation.IncreasePool:
|
case Focus2Operation.IncreasePool:
|
||||||
op = "IncreasePool";
|
op = "IncreasePool";
|
||||||
break;
|
break;
|
||||||
|
case Focus2Operation.LevelUpUpgrade:
|
||||||
|
op = "LevelUpUpgrade";
|
||||||
|
break;
|
||||||
case Focus2Operation.UnlockUpgrade:
|
case Focus2Operation.UnlockUpgrade:
|
||||||
op = "UnlockUpgrade";
|
op = "UnlockUpgrade";
|
||||||
break;
|
break;
|
||||||
case Focus2Operation.ActivateWay:
|
case Focus2Operation.ActivateWay:
|
||||||
op = "ActivateWay";
|
op = "ActivateWay";
|
||||||
break;
|
break;
|
||||||
case Focus2Operation.LevelUpUpgrade:
|
case Focus2Operation.UpdateUpgrade:
|
||||||
op = "LevelUpUpgrade";
|
op = "UpdateUpgrade";
|
||||||
break;
|
break;
|
||||||
case Focus2Operation.ConvertShard:
|
case Focus2Operation.ConvertShard:
|
||||||
op = "ConvertShard";
|
op = "ConvertShard";
|
||||||
@ -142,7 +145,8 @@ export const focusController: RequestHandler = async (req, res) => {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "LevelUpUpgrade": {
|
case "LevelUpUpgrade":
|
||||||
|
case "UpdateUpgrade": {
|
||||||
const request = JSON.parse(String(req.body)) as ILevelUpUpgradeRequest;
|
const request = JSON.parse(String(req.body)) as ILevelUpUpgradeRequest;
|
||||||
const focusPolarity = focusTypeToPolarity(request.FocusInfos[0].ItemType);
|
const focusPolarity = focusTypeToPolarity(request.FocusInfos[0].ItemType);
|
||||||
const inventory = await getInventory(account._id.toString());
|
const inventory = await getInventory(account._id.toString());
|
||||||
@ -255,9 +259,10 @@ enum Focus3Operation {
|
|||||||
enum Focus2Operation {
|
enum Focus2Operation {
|
||||||
UnlockWay = "2",
|
UnlockWay = "2",
|
||||||
IncreasePool = "4", // {"FocusType":"/Lotus/Upgrades/Focus/Defense/DefenseFocusAbility","CurrentTotalCapacity":5,"NewTotalCapacity":7}
|
IncreasePool = "4", // {"FocusType":"/Lotus/Upgrades/Focus/Defense/DefenseFocusAbility","CurrentTotalCapacity":5,"NewTotalCapacity":7}
|
||||||
UnlockUpgrade = "5",
|
UnlockUpgrade = "3",
|
||||||
|
LevelUpUpgrade = "5",
|
||||||
ActivateWay = "6",
|
ActivateWay = "6",
|
||||||
LevelUpUpgrade = "7", // used to level up & activate ability
|
UpdateUpgrade = "7", // used to change the IsActive state, same format as ILevelUpUpgradeRequest
|
||||||
ConvertShard = "11"
|
ConvertShard = "11"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user