Misc fixes

This commit is contained in:
hondacrx
2022-03-02 10:04:24 -05:00
parent 150b09205b
commit 30a5bcdb4d
7 changed files with 26 additions and 28 deletions
+3 -10
View File
@@ -344,19 +344,12 @@ namespace Game.Chat
}
[Command("loglevel", RBACPermissions.CommandServerSetLoglevel, true)]
static bool HandleServerSetLogLevelCommand(CommandHandler handler, StringArguments args)
static bool HandleServerSetLogLevelCommand(CommandHandler handler, string type, string name, int level)
{
if (args.Empty())
if (name.IsEmpty() || level < 0 || (type != "a" && type != "l"))
return false;
string type = args.NextString();
string name = args.NextString();
string level = args.NextString();
if (type.IsEmpty() || name.IsEmpty() || level.IsEmpty() || (type[0] != 'a' && type[0] != 'l'))
return false;
return Log.SetLogLevel(name, level, type[0] == 'l');
return Log.SetLogLevel(name, level, type == "l");
}
[Command("motd", RBACPermissions.CommandServerSetMotd, true)]
@@ -911,8 +911,6 @@ namespace Game.Maps
return false;
}
public virtual void Initialize() { }
public virtual void Update(uint diff) { }
// Called when a player successfully enters the instance.
@@ -191,7 +191,7 @@ namespace Game.Movement
{
uint path, cost;
Global.ObjectMgr.GetTaxiPath(taxi[src], taxi[dst], out path, out cost);
if (path > CliDB.TaxiPathNodesByPath.Keys.Max())
if (path >= CliDB.TaxiPathNodesByPath.Keys.Max())
return;
var nodes = CliDB.TaxiPathNodesByPath[path];
+1
View File
@@ -3247,6 +3247,7 @@ namespace Game.Entities
58552, // Return to Orgrimmar
58533, // Return to Stormwind
21855, // Challenge Flag
38762, // Force of Neltharaku
51122, // Fierce Lightning Stike
71848 // Toxic Wasteling Find Target
}, spellInfo =>
+1 -1
View File
@@ -132,7 +132,7 @@ namespace Game
if (action > WardenActions.Ban)
Log.outError(LogFilter.Warden, "Warden check override action out of range (ID: {0}, action: {1})", checkId, action);
// Check if check actually exists before accessing the CheckStore vector
else if (checkId > CheckStore.Count)
else if (checkId >= CheckStore.Count)
Log.outError(LogFilter.Warden, "Warden check action override for non-existing check (ID: {0}, action: {1}), skipped", checkId, action);
else
{