232323
This commit is contained in:
@@ -158,6 +158,8 @@ public class FightController : ControllerBase
|
||||
myHarm += await _fightService.GetUserFightHarm(userId);
|
||||
otHarm = fightResult.otHarm;
|
||||
await _attrService.UpdateUserBlood(userId, 1, fightResult.myHarm);
|
||||
await _attrService.AddUserLoadState(userId, fightResult.myStateData);
|
||||
await _fightService.HandelFightEnd(userId, fightResult.myRemData);
|
||||
}
|
||||
|
||||
var myAttr = await _attrService.GetUserAttrModel(userId, fight.scene);
|
||||
@@ -179,6 +181,8 @@ public class FightController : ControllerBase
|
||||
{
|
||||
await _fightService.SetUserFightHarm(fight.mainId, fightResult.otHarm);
|
||||
await _attrService.UpdateUserBlood(fight.mainId, 1, fightResult.otHarm);
|
||||
await _attrService.AddUserLoadState(fight.mainId, fightResult.otStateData);
|
||||
await _fightService.HandelFightEnd(fight.mainId, fightResult.otRemData);
|
||||
}
|
||||
|
||||
otAttr = await _attrService.GetUserAttrModel(fight.mainId, fight.scene);
|
||||
@@ -224,7 +228,7 @@ public class FightController : ControllerBase
|
||||
{
|
||||
decimal diff = myAttr.agility - otAttr.agility;
|
||||
decimal bl = diff / otAttr.agility;
|
||||
cool = Convert.ToInt32((1-bl) * 1000.0m);
|
||||
cool = Convert.ToInt32((1 - bl) * 1000.0m);
|
||||
cool = cool < 10 ? 10 : cool;
|
||||
cool = cool > 1000 ? 1000 : cool;
|
||||
}
|
||||
@@ -300,7 +304,7 @@ public class FightController : ControllerBase
|
||||
{
|
||||
if (await _fightService.RemoveUserFight(userId, fightId))
|
||||
{
|
||||
await _fightService.SetFightWin(fight, fight.mainId,false);
|
||||
await _fightService.SetFightWin(fight, fight.mainId, false);
|
||||
await _fightService.RemoveFightHarm(fightId, userId); //移除伤害
|
||||
var nextFight = myFight.FindAll(it => it != fightId);
|
||||
string nextId = nextFight.Count > 0 ? nextFight[0] : "";
|
||||
|
||||
Reference in New Issue
Block a user