mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 10:14:06 +00:00
Merge DarkflameServer
This commit is contained in:
@@ -340,7 +340,7 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
|
||||
|
||||
const auto sysAddr = entity->GetSystemAddress();
|
||||
|
||||
Game::logger->Log("UserManager", "Transferring %s to Zone %i (Instance %i | Clone %i | Mythran Shift: %s) with IP %s and Port %i\n", sysAddr.ToString(), zoneID, zoneInstance, zoneClone, mythranShift == true ? "true" : "false", serverIP.c_str(), serverPort);
|
||||
Game::logger->Log("UserManager", "Transferring %s to Zone %i (Instance %i | Clone %i | Mythran Shift: %s) with IP %s and Port %i\n", entity->GetCharacter()->GetName().c_str(), zoneID, zoneInstance, zoneClone, mythranShift == true ? "true" : "false", serverIP.c_str(), serverPort);
|
||||
|
||||
if (entity->GetCharacter()) {
|
||||
entity->GetCharacter()->SetZoneID(zoneID);
|
||||
@@ -675,6 +675,21 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
|
||||
entity->GetCharacter()->SetPlayerFlag(flagId, true);
|
||||
}
|
||||
|
||||
if (chatCommand == "setflag" && entity->GetGMLevel() >= GAME_MASTER_LEVEL_DEVELOPER && args.size() == 2)
|
||||
{
|
||||
uint32_t flagId;
|
||||
std::string onOffFlag = args[0];
|
||||
if (!GeneralUtils::TryParse(args[1], flagId))
|
||||
{
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"Invalid flag id.");
|
||||
return;
|
||||
}
|
||||
if (onOffFlag != "off" && onOffFlag != "on") {
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"Invalid flag type.");
|
||||
return;
|
||||
}
|
||||
entity->GetCharacter()->SetPlayerFlag(flagId, onOffFlag == "on");
|
||||
}
|
||||
if (chatCommand == "clearflag" && entity->GetGMLevel() >= GAME_MASTER_LEVEL_DEVELOPER && args.size() == 1)
|
||||
{
|
||||
uint32_t flagId;
|
||||
@@ -1938,53 +1953,54 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
|
||||
}
|
||||
|
||||
bool SlashCommandHandler::CheckIfAccessibleZone(const unsigned int zoneID) {
|
||||
switch (zoneID) {
|
||||
case 98:
|
||||
case 1000:
|
||||
case 1001:
|
||||
switch (zoneID) {
|
||||
case 98:
|
||||
case 1000:
|
||||
case 1001:
|
||||
|
||||
case 1100:
|
||||
case 1101:
|
||||
case 1150:
|
||||
case 1151:
|
||||
case 1152:
|
||||
case 1100:
|
||||
case 1101:
|
||||
case 1150:
|
||||
case 1151:
|
||||
case 1152:
|
||||
|
||||
case 1200:
|
||||
case 1201:
|
||||
case 1200:
|
||||
case 1201:
|
||||
|
||||
case 1250:
|
||||
case 1251:
|
||||
case 1260:
|
||||
case 1250:
|
||||
case 1251:
|
||||
case 1260:
|
||||
|
||||
case 1300:
|
||||
case 1350:
|
||||
case 1351:
|
||||
case 1300:
|
||||
case 1350:
|
||||
case 1351:
|
||||
|
||||
case 1400:
|
||||
case 1401:
|
||||
case 1450:
|
||||
case 1451:
|
||||
case 1400:
|
||||
case 1401:
|
||||
case 1450:
|
||||
case 1451:
|
||||
|
||||
case 1600:
|
||||
case 1601:
|
||||
case 1602:
|
||||
case 1603:
|
||||
case 1604:
|
||||
case 1600:
|
||||
case 1601:
|
||||
case 1602:
|
||||
case 1603:
|
||||
case 1604:
|
||||
|
||||
case 1800:
|
||||
case 1900:
|
||||
case 2000:
|
||||
case 1700:
|
||||
case 1800:
|
||||
case 1900:
|
||||
case 2000:
|
||||
|
||||
case 58004:
|
||||
case 58005:
|
||||
case 58006:
|
||||
return true;
|
||||
case 58004:
|
||||
case 58005:
|
||||
case 58006:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
void SlashCommandHandler::SendAnnouncement(const std::string& title, const std::string& message) {
|
||||
|
Reference in New Issue
Block a user