Merge pull request #110 from rgto/community2801

Command to makes you char full resources (arcane power, furia and etc.)
This commit is contained in:
Enthusiast 2023-01-28 15:10:14 -03:00 committed by GitHub
commit b83e808cad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 1 deletions

View File

@ -43,6 +43,9 @@ Switch private Tag for connect
### !powerful
Makes your character with absurd amount of damage. Useful for testing.
### !resourceful
Makes your character with full resource. Useful for testing.
### !info
Get current game information.

View File

@ -55,6 +55,33 @@ public class PowerfulCommand : CommandGroup
}
}
[CommandGroup("resourcefull", "Makes your character with full resource. Useful for testing.",
Account.UserLevels.Tester)]
public class ResourcefullCommand : CommandGroup
{
[DefaultCommand]
public string Resourcefull(string[] @params, BattleClient invokerClient)
{
if (invokerClient?.InGameClient?.Player is not { } player)
return "You must be in game to use this command.";
if (player.Attributes.FixedMap.Contains(FixedAttribute.Resourcefull))
{
player.Attributes.FixedMap.Remove(FixedAttribute.Resourcefull);
player.Attributes.BroadcastChangedIfRevealed();
return "You are no longer Resourcefull.";
}
player.Attributes.FixedMap.Add(FixedAttribute.Resourcefull, (attributes) =>
{
attributes[GameAttribute.Resource_Cur, 1] = 100;
});
player.Attributes.BroadcastChangedIfRevealed();
return "You are full resource.";
}
}
[CommandGroup("info", "Get current game information.")]
public class InfoCommand : CommandGroup
{

View File

@ -8,7 +8,8 @@ namespace DiIiS_NA.GameServer.GSSystem.ObjectsSystem
{
Invulnerable,
Speed,
Powerful
Powerful,
Resourcefull
}
public class FixedMap