Misc fixes
This commit is contained in:
@@ -310,12 +310,13 @@ public class Log
|
|||||||
return GetLoggerByType(parentLogger);
|
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 (newLeveli < 0)
|
||||||
if (newLevel < 0)
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
LogLevel newLevel = (LogLevel)newLeveli;
|
||||||
|
|
||||||
if (isLogger)
|
if (isLogger)
|
||||||
{
|
{
|
||||||
foreach (var logger in loggers.Values)
|
foreach (var logger in loggers.Values)
|
||||||
|
|||||||
@@ -344,19 +344,12 @@ namespace Game.Chat
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Command("loglevel", RBACPermissions.CommandServerSetLoglevel, true)]
|
[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;
|
return false;
|
||||||
|
|
||||||
string type = args.NextString();
|
return Log.SetLogLevel(name, level, type == "l");
|
||||||
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');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command("motd", RBACPermissions.CommandServerSetMotd, true)]
|
[Command("motd", RBACPermissions.CommandServerSetMotd, true)]
|
||||||
|
|||||||
@@ -911,8 +911,6 @@ namespace Game.Maps
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void Initialize() { }
|
|
||||||
|
|
||||||
public virtual void Update(uint diff) { }
|
public virtual void Update(uint diff) { }
|
||||||
|
|
||||||
// Called when a player successfully enters the instance.
|
// Called when a player successfully enters the instance.
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ namespace Game.Movement
|
|||||||
{
|
{
|
||||||
uint path, cost;
|
uint path, cost;
|
||||||
Global.ObjectMgr.GetTaxiPath(taxi[src], taxi[dst], out path, out 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;
|
return;
|
||||||
|
|
||||||
var nodes = CliDB.TaxiPathNodesByPath[path];
|
var nodes = CliDB.TaxiPathNodesByPath[path];
|
||||||
|
|||||||
@@ -3247,6 +3247,7 @@ namespace Game.Entities
|
|||||||
58552, // Return to Orgrimmar
|
58552, // Return to Orgrimmar
|
||||||
58533, // Return to Stormwind
|
58533, // Return to Stormwind
|
||||||
21855, // Challenge Flag
|
21855, // Challenge Flag
|
||||||
|
38762, // Force of Neltharaku
|
||||||
51122, // Fierce Lightning Stike
|
51122, // Fierce Lightning Stike
|
||||||
71848 // Toxic Wasteling Find Target
|
71848 // Toxic Wasteling Find Target
|
||||||
}, spellInfo =>
|
}, spellInfo =>
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ namespace Game
|
|||||||
if (action > WardenActions.Ban)
|
if (action > WardenActions.Ban)
|
||||||
Log.outError(LogFilter.Warden, "Warden check override action out of range (ID: {0}, action: {1})", checkId, action);
|
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
|
// 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);
|
Log.outError(LogFilter.Warden, "Warden check action override for non-existing check (ID: {0}, action: {1}), skipped", checkId, action);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1115,6 +1115,14 @@ namespace Scripts.World.NpcSpecial
|
|||||||
[Script]
|
[Script]
|
||||||
class npc_garments_of_quests : EscortAI
|
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)
|
public npc_garments_of_quests(Creature creature) : base(creature)
|
||||||
{
|
{
|
||||||
switch (me.GetEntry())
|
switch (me.GetEntry())
|
||||||
@@ -1139,25 +1147,22 @@ namespace Scripts.World.NpcSpecial
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Reset();
|
Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectGuid CasterGUID;
|
void Initialize()
|
||||||
|
{
|
||||||
|
IsHealed = false;
|
||||||
|
CanRun = false;
|
||||||
|
|
||||||
bool IsHealed;
|
RunAwayTimer = 5000;
|
||||||
bool CanRun;
|
}
|
||||||
|
|
||||||
uint RunAwayTimer;
|
|
||||||
uint quest;
|
|
||||||
|
|
||||||
public override void Reset()
|
public override void Reset()
|
||||||
{
|
{
|
||||||
CasterGUID.Clear();
|
CasterGUID.Clear();
|
||||||
|
|
||||||
IsHealed = false;
|
Initialize();
|
||||||
CanRun = false;
|
|
||||||
|
|
||||||
RunAwayTimer = 5000;
|
|
||||||
|
|
||||||
me.SetStandState(UnitStandStateType.Kneel);
|
me.SetStandState(UnitStandStateType.Kneel);
|
||||||
// expect database to have RegenHealth=0
|
// expect database to have RegenHealth=0
|
||||||
|
|||||||
Reference in New Issue
Block a user