Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add god admin command #1924

Merged
merged 7 commits into from
Jun 9, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions Source/ACE.Server/Command/Handlers/AdminCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1473,9 +1473,36 @@ public static void HandleFumble(Session session, params string[] parameters)
[CommandHandler("god", AccessLevel.Sentinel, CommandHandlerFlag.RequiresWorld, 0)]
public static void HandleGod(Session session, params string[] parameters)
{
// @god - Sets your own stats to the specified level.
// @god - Sets your own stats to a godly level.

// TODO: output
session.Player.TotalExperience = 191226310246;
session.Player.Level = 999;

session.Player.Session.Network.EnqueueSend(new GameMessagePrivateUpdatePropertyInt(session.Player, PropertyInt.Level, 999));

foreach (Skill s in Enum.GetValues(typeof(Skill)))
{
session.Player.TrainSkill(s, 0);
session.Player.SpecializeSkill(s, 0);
var playerSkill = session.Player.Skills[s];
session.Player.Session.Network.EnqueueSend(new GameMessagePrivateUpdateSkill(session.Player, s, playerSkill.AdvancementClass, playerSkill.Ranks, 1000, 0));
}

foreach (PropertyAttribute p in Enum.GetValues(typeof(PropertyAttribute)))
{
if (p == PropertyAttribute.Undef)
{
continue;
}
var playerAttr = session.Player.Attributes[p];
playerAttr.StartingValue = 9999;
session.Player.Session.Network.EnqueueSend(new GameMessagePrivateUpdateAttribute(session.Player, p, playerAttr.Ranks, playerAttr.StartingValue, playerAttr.ExperienceSpent));
}

session.Player.SetMaxVitals();

session.Player.PlayParticleEffect(PlayScript.LevelUp, session.Player.Guid);
session.Player.PlayParticleEffect(PlayScript.BaelZharonSmite, session.Player.Guid);

// output: You are now a god!!!

Expand Down