Merge pull request #151 from Xyberoid/dev

fix: 小bug
This commit is contained in:
Mistmoon 2025-04-02 22:10:51 +08:00 committed by GitHub
commit 935e1c202c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 23 additions and 5 deletions

View File

@ -341,10 +341,6 @@ public class Character : Movable, ICharacter
}
case EquipmentType.BERSERK_POTION:
{
if (IsBerserk)
{
return false;
}
IsBerserk = true;
BerserkTime = Environment.TickCount64;
SetCharacterState(CharacterState1, CharacterState.BERSERK);//此处缺少时间限制

View File

@ -299,6 +299,7 @@ namespace Gaming
character.Shoes.SubPositiveV(GameData.CrazySpeed);
character.ATKFrequency = GameData.ATKFreq;
character.BerserkTime = long.MaxValue;
character.IsBerserk = false;
}
}
}
@ -314,7 +315,15 @@ namespace Gaming
character.IsShoes = false;
}
}
}
public void CheckInvisibility(Character character)
{
int nowtime = gameMap.Timer.NowTime();
if (nowtime >= GameData.SevenMinutes
)
{
character.visible = true;
}
}
}
}

View File

@ -423,6 +423,18 @@ namespace Gaming
{
if (!gameMap.Timer.IsGaming)
return false;
int nowtime = gameMap.Timer.NowTime();
if (nowtime >= GameData.SevenMinutes)
{
if (equiptype == EquipmentType.INVISIBILITY_POTION)
{
return false;
}
}
else if (equiptype == EquipmentType.BERSERK_POTION)
{
return false;
}
Character? character = gameMap.FindCharacterInPlayerID(teamID, characterID);
if (character != null && character.IsRemoved == false)
return equipManager.GetEquipment(character, equiptype);

View File

@ -214,5 +214,6 @@ namespace Preparation.Utility
public const int InitialMoney = 5000;
public const int CharacterTotalNumMax = 6;
public const double RecycleRate = 0.5;
public const int SevenMinutes = 420000;
}
}