fix: Fixes spawning on admin gump (#763)

This commit is contained in:
Kamron Batman 2021-09-04 18:41:24 -07:00 committed by GitHub
parent 437ebf7038
commit 2f8508e320
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1485,10 +1485,22 @@ namespace Server.Gumps
{
case AccessLevel.Owner:
case AccessLevel.Developer:
case AccessLevel.Administrator: return 0x516;
case AccessLevel.Seer: return 0x144;
case AccessLevel.GameMaster: return 0x21;
case AccessLevel.Counselor: return 0x2;
case AccessLevel.Administrator:
{
return 0x516;
}
case AccessLevel.Seer:
{
return 0x144;
}
case AccessLevel.GameMaster:
{
return 0x21;
}
case AccessLevel.Counselor:
{
return 0x2;
}
default:
{
if (m.Kills >= 5)
@ -1982,24 +1994,39 @@ namespace Server.Gumps
switch (index)
{
case 0:
{
page = AdminGumpPage.Information_General;
break;
}
case 1:
{
page = AdminGumpPage.Administer;
break;
}
case 2:
{
page = AdminGumpPage.Clients;
break;
}
case 3:
{
page = AdminGumpPage.Accounts;
break;
}
case 4:
{
page = AdminGumpPage.Firewall;
break;
}
case 5:
{
page = AdminGumpPage.Information_Perf;
break;
default: return;
}
default:
{
return;
}
}
from.SendGump(new AdminGump(from, page));
@ -2064,68 +2091,126 @@ namespace Server.Gumps
switch (index)
{
case 0:
{
page = AdminGumpPage.Administer_WorldBuilding;
break;
}
case 1:
{
page = AdminGumpPage.Administer_Server;
break;
}
case 2:
{
page = AdminGumpPage.Administer_Access;
break;
}
case 3:
{
page = AdminGumpPage.Administer_Commands;
break;
}
case 101:
{
InvokeCommand("TelGen");
notice = "Teleporters have been generated.";
break;
}
case 102:
{
InvokeCommand("MoonGen");
notice = "Moongates have been generated.";
break;
}
case 104:
{
InvokeCommand("DoorGen");
notice = "Doors have been generated.";
break;
}
case 103:
InvokeCommand("GenerateSpawners ./Data/Spawns/*.json");
{
if (Core.SA)
{
InvokeCommand("GenerateSpawners Data/Spawns/post-uoml/*/*.json");
}
else
{
if (Core.ML)
{
InvokeCommand("GenerateSpawners Data/Spawns/uoml/malas/*/*.json");
}
if (Core.SE)
{
InvokeCommand("GenerateSpawners Data/Spawns/uoml/tokuno/*/*.json");
}
if (Core.AOS)
{
InvokeCommand("GenerateSpawners Data/Spawns/uoml/ilshenar/*/*.json");
}
InvokeCommand("GenerateSpawners Data/Spawns/uoml/trammel/*/*.json");
InvokeCommand("GenerateSpawners Data/Spawns/uoml/felucca/*/*.json");
}
notice = "Spawners have been generated.";
break;
}
case 105:
{
InvokeCommand("SignGen");
notice = "Signs have been generated.";
break;
}
case 106:
{
InvokeCommand("Decorate");
notice = "Decoration has been generated.";
break;
}
case 110:
{
InvokeCommand("Freeze");
notice = "Target bounding points.";
break;
}
case 120:
{
InvokeCommand("Unfreeze");
notice = "Target bounding points.";
break;
}
case 200:
{
InvokeCommand("Save");
notice = "The world has been saved.";
break;
}
case 201:
{
Shutdown(false, true);
break;
}
case 202:
{
Shutdown(false, false);
break;
}
case 203:
{
Shutdown(true, true);
break;
}
case 204:
{
Shutdown(true, false);
break;
}
case 210:
case 211:
{
@ -2145,38 +2230,54 @@ namespace Server.Gumps
}
case 300:
{
InvokeCommand("Kick");
notice = "Target the player to kick.";
break;
}
case 301:
{
InvokeCommand("Ban");
notice = "Target the player to ban.";
break;
}
case 302:
{
InvokeCommand("Firewall");
notice = "Target the player to firewall.";
break;
}
case 303:
{
page = AdminGumpPage.Administer_Access_Lockdown;
break;
}
case 310:
{
InvokeCommand("Set AccessLevel Player");
notice = "Target the player to change their access level. (Player)";
break;
}
case 311:
{
InvokeCommand("Set AccessLevel Counselor");
notice = "Target the player to change their access level. (Counselor)";
break;
}
case 312:
{
InvokeCommand("Set AccessLevel GameMaster");
notice = "Target the player to change their access level. (Game Master)";
break;
}
case 313:
{
InvokeCommand("Set AccessLevel Seer");
notice = "Target the player to change their access level. (Seer)";
break;
}
case 314:
{
@ -2212,84 +2313,124 @@ namespace Server.Gumps
}
case 400:
{
notice = "Enter search terms to add objects.";
break;
}
case 401:
{
InvokeCommand("Remove");
notice = "Target the item or mobile to remove.";
break;
}
case 402:
{
InvokeCommand("Dupe");
notice = "Target the item to dupe.";
break;
}
case 403:
{
InvokeCommand("DupeInBag");
notice = "Target the item to dupe. The item will be duped at it's current location.";
break;
}
case 404:
{
InvokeCommand("Props");
notice = "Target the item or mobile to inspect.";
break;
}
case 405:
{
InvokeCommand("Skills");
notice = "Target a mobile to view their skills.";
break;
}
case 406:
{
InvokeCommand("Set Blessed False");
notice = "Target the mobile to make mortal.";
break;
}
case 407:
{
InvokeCommand("Set Blessed True");
notice = "Target the mobile to make immortal.";
break;
}
case 408:
{
InvokeCommand("Set Squelched True");
notice = "Target the mobile to squelch.";
break;
}
case 409:
{
InvokeCommand("Set Squelched False");
notice = "Target the mobile to unsquelch.";
break;
}
case 410:
{
InvokeCommand("Set Frozen True");
notice = "Target the mobile to freeze.";
break;
}
case 411:
{
InvokeCommand("Set Frozen False");
notice = "Target the mobile to unfreeze.";
break;
}
case 412:
{
InvokeCommand("Set Hidden True");
notice = "Target the mobile to hide.";
break;
}
case 413:
{
InvokeCommand("Set Hidden False");
notice = "Target the mobile to unhide.";
break;
}
case 414:
{
InvokeCommand("Kill");
notice = "Target the mobile to kill.";
break;
}
case 415:
{
InvokeCommand("Resurrect");
notice = "Target the mobile to resurrect.";
break;
}
case 416:
{
InvokeCommand("Move");
notice = "Target the item or mobile to move.";
break;
}
case 417:
{
InvokeCommand("Wipe");
notice = "Target bounding points.";
break;
}
case 418:
{
InvokeCommand("Tele");
notice = "Choose your destination.";
break;
}
case 419:
{
InvokeCommand("Multi Tele");
notice = "Choose your destination.";
break;
}
case 500:
case 501:
@ -2377,21 +2518,31 @@ namespace Server.Gumps
switch (index)
{
case 400:
{
InvokeCommand("Add");
break;
}
case 111:
{
InvokeCommand("FreezeWorld");
break;
}
case 112:
{
InvokeCommand("FreezeMap");
break;
}
case 121:
{
InvokeCommand("UnfreezeWorld");
break;
}
case 122:
{
InvokeCommand("UnfreezeMap");
break;
}
}
break;
}
@ -2544,9 +2695,10 @@ namespace Server.Gumps
switch (index)
{
case 0:
from.SendGump(
{
@from.SendGump(
new AdminGump(
from,
@from,
AdminGumpPage.AccountDetails_Information,
0,
null,
@ -2555,10 +2707,12 @@ namespace Server.Gumps
)
);
break;
}
case 1:
from.SendGump(
{
@from.SendGump(
new AdminGump(
from,
@from,
AdminGumpPage.AccountDetails_Characters,
0,
null,
@ -2567,10 +2721,12 @@ namespace Server.Gumps
)
);
break;
}
case 2:
from.SendGump(
{
@from.SendGump(
new AdminGump(
from,
@from,
AdminGumpPage.AccountDetails_Comments,
0,
null,
@ -2579,20 +2735,26 @@ namespace Server.Gumps
)
);
break;
}
case 3:
from.SendGump(
new AdminGump(from, AdminGumpPage.AccountDetails_Tags, 0, null, null, m_State)
{
@from.SendGump(
new AdminGump(@from, AdminGumpPage.AccountDetails_Tags, 0, null, null, m_State)
);
break;
}
case 13:
from.SendGump(
new AdminGump(from, AdminGumpPage.AccountDetails_Access, 0, null, null, m_State)
{
@from.SendGump(
new AdminGump(@from, AdminGumpPage.AccountDetails_Access, 0, null, null, m_State)
);
break;
}
case 14:
from.SendGump(
{
@from.SendGump(
new AdminGump(
from,
@from,
AdminGumpPage.AccountDetails_Access_ClientIPs,
0,
null,
@ -2601,10 +2763,12 @@ namespace Server.Gumps
)
);
break;
}
case 15:
from.SendGump(
{
@from.SendGump(
new AdminGump(
from,
@from,
AdminGumpPage.AccountDetails_Access_Restrictions,
0,
null,
@ -2613,14 +2777,19 @@ namespace Server.Gumps
)
);
break;
}
case 4:
from.Prompt = new AddCommentPrompt(m_State as Account);
from.SendMessage("Enter the new account comment.");
{
@from.Prompt = new AddCommentPrompt(m_State as Account);
@from.SendMessage("Enter the new account comment.");
break;
}
case 5:
from.Prompt = new AddTagNamePrompt(m_State as Account);
from.SendMessage("Enter the new tag name.");
{
@from.Prompt = new AddTagNamePrompt(m_State as Account);
@from.SendMessage("Enter the new tag name.");
break;
}
case 6:
{
var un = info.GetTextEntry(0)?.Text.Trim();
@ -2727,9 +2896,10 @@ namespace Server.Gumps
break;
}
case 8:
from.SendGump(
{
@from.SendGump(
new AdminGump(
from,
@from,
AdminGumpPage.AccountDetails_ChangePassword,
0,
null,
@ -2738,10 +2908,12 @@ namespace Server.Gumps
)
);
break;
}
case 9:
from.SendGump(
{
@from.SendGump(
new AdminGump(
from,
@from,
AdminGumpPage.AccountDetails_ChangeAccess,
0,
null,
@ -2750,6 +2922,7 @@ namespace Server.Gumps
)
);
break;
}
case 10:
case 11:
{