Misc fixes
This commit is contained in:
@@ -310,12 +310,13 @@ public class Log
|
||||
return GetLoggerByType(parentLogger);
|
||||
}
|
||||
|
||||
public static bool SetLogLevel(string name, string newLevelc, bool isLogger = true)
|
||||
public static bool SetLogLevel(string name, int newLeveli, bool isLogger = true)
|
||||
{
|
||||
LogLevel newLevel = (LogLevel)uint.Parse(newLevelc);
|
||||
if (newLevel < 0)
|
||||
if (newLeveli < 0)
|
||||
return false;
|
||||
|
||||
LogLevel newLevel = (LogLevel)newLeveli;
|
||||
|
||||
if (isLogger)
|
||||
{
|
||||
foreach (var logger in loggers.Values)
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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 =>
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -1115,6 +1115,14 @@ namespace Scripts.World.NpcSpecial
|
||||
[Script]
|
||||
class npc_garments_of_quests : EscortAI
|
||||
{
|
||||
ObjectGuid CasterGUID;
|
||||
|
||||
bool IsHealed;
|
||||
bool CanRun;
|
||||
|
||||
uint RunAwayTimer;
|
||||
uint quest;
|
||||
|
||||
public npc_garments_of_quests(Creature creature) : base(creature)
|
||||
{
|
||||
switch (me.GetEntry())
|
||||
@@ -1139,25 +1147,22 @@ namespace Scripts.World.NpcSpecial
|
||||
break;
|
||||
}
|
||||
|
||||
Reset();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
ObjectGuid CasterGUID;
|
||||
void Initialize()
|
||||
{
|
||||
IsHealed = false;
|
||||
CanRun = false;
|
||||
|
||||
bool IsHealed;
|
||||
bool CanRun;
|
||||
|
||||
uint RunAwayTimer;
|
||||
uint quest;
|
||||
RunAwayTimer = 5000;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
CasterGUID.Clear();
|
||||
|
||||
IsHealed = false;
|
||||
CanRun = false;
|
||||
|
||||
RunAwayTimer = 5000;
|
||||
Initialize();
|
||||
|
||||
me.SetStandState(UnitStandStateType.Kneel);
|
||||
// expect database to have RegenHealth=0
|
||||
|
||||
Reference in New Issue
Block a user