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