whitespace changed
This commit is contained in:
@@ -97,7 +97,7 @@ func GetLernCost(c *gin.Context) {
|
||||
// costResult.Category = gsmaster.GetSkillCategory(request.Name)
|
||||
// costResult.Difficulty = gsmaster.GetSkillDifficulty(costResult.Category, costResult.SkillName)
|
||||
var response []gsmaster.SkillCostResultNew
|
||||
|
||||
|
||||
// Für "learn" Aktion: nur eine Berechnung, da Lernkosten einmalig sind
|
||||
if request.Action == "learn" {
|
||||
levelResult := gsmaster.SkillCostResultNew{
|
||||
@@ -294,7 +294,7 @@ func calculateSkillImproveCostNewSystem(request *gsmaster.LernCostRequest, resul
|
||||
// 10 Gold = 1 EP, aber maximal EP/2 kann durch Gold ersetzt werden
|
||||
maxEPFromGold := result.EP / 2
|
||||
epFromGold := *remainingGold / 10
|
||||
|
||||
|
||||
if epFromGold > maxEPFromGold {
|
||||
// Beschränke auf maximal EP/2
|
||||
epFromGold = maxEPFromGold
|
||||
@@ -303,7 +303,7 @@ func calculateSkillImproveCostNewSystem(request *gsmaster.LernCostRequest, resul
|
||||
// Verwende das verfügbare Gold
|
||||
goldUsed = *remainingGold
|
||||
}
|
||||
|
||||
|
||||
// Reduziere EP um die durch Gold ersetzte Menge
|
||||
result.EP -= epFromGold
|
||||
result.GoldUsed = goldUsed
|
||||
@@ -369,7 +369,7 @@ func calculateSkillLearnCostNewSystem(request *gsmaster.LernCostRequest, result
|
||||
// 10 Gold = 1 EP, aber maximal EP/2 kann durch Gold ersetzt werden
|
||||
maxEPFromGold := result.EP / 2
|
||||
epFromGold := *remainingGold / 10
|
||||
|
||||
|
||||
if epFromGold > maxEPFromGold {
|
||||
// Beschränke auf maximal EP/2
|
||||
epFromGold = maxEPFromGold
|
||||
@@ -378,7 +378,7 @@ func calculateSkillLearnCostNewSystem(request *gsmaster.LernCostRequest, result
|
||||
// Verwende das verfügbare Gold
|
||||
goldUsed = *remainingGold
|
||||
}
|
||||
|
||||
|
||||
// Reduziere EP um die durch Gold ersetzte Menge
|
||||
result.EP -= epFromGold
|
||||
result.GoldUsed = goldUsed
|
||||
|
||||
@@ -761,13 +761,13 @@ func CalcSkillImproveCost(costResult *SkillCostResultNew, currentLevel int, rewa
|
||||
// 10 Gold = 1 EP, aber maximal EP/2 kann durch Gold ersetzt werden
|
||||
maxEPFromGold := costResult.EP / 2
|
||||
epFromGold := costResult.GoldUsed / 10
|
||||
|
||||
|
||||
if epFromGold > maxEPFromGold {
|
||||
// Beschränke auf maximal EP/2
|
||||
epFromGold = maxEPFromGold
|
||||
costResult.GoldUsed = epFromGold * 10
|
||||
}
|
||||
|
||||
|
||||
// Reduziere EP um die durch Gold ersetzte Menge
|
||||
costResult.EP -= epFromGold
|
||||
}
|
||||
@@ -826,13 +826,13 @@ func CalcSpellLernCost(costResult *SkillCostResultNew, reward *string) error {
|
||||
// 10 Gold = 1 EP, aber maximal EP/2 kann durch Gold ersetzt werden
|
||||
maxEPFromGold := costResult.EP / 2
|
||||
epFromGold := costResult.GoldUsed / 10
|
||||
|
||||
|
||||
if epFromGold > maxEPFromGold {
|
||||
// Beschränke auf maximal EP/2
|
||||
epFromGold = maxEPFromGold
|
||||
costResult.GoldUsed = epFromGold * 10
|
||||
}
|
||||
|
||||
|
||||
// Reduziere EP um die durch Gold ersetzte Menge
|
||||
costResult.EP -= epFromGold
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user