Core/Misc: Some missed $ for string interpolation and some cleanups to code.
This commit is contained in:
@@ -118,7 +118,7 @@ namespace BNetServer.Networking
|
|||||||
|
|
||||||
++failedLogins;
|
++failedLogins;
|
||||||
|
|
||||||
Log.outDebug(LogFilter.Network, "MaxWrongPass : {maxWrongPassword}, failed_login : {accountId}");
|
Log.outDebug(LogFilter.Network, $"MaxWrongPass : {maxWrongPassword}, failed_login : {accountId}");
|
||||||
|
|
||||||
if (failedLogins >= maxWrongPassword)
|
if (failedLogins >= maxWrongPassword)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ namespace BNetServer
|
|||||||
int restPort = ConfigMgr.GetDefaultValue("LoginREST.Port", 8081);
|
int restPort = ConfigMgr.GetDefaultValue("LoginREST.Port", 8081);
|
||||||
if (restPort < 0 || restPort > 0xFFFF)
|
if (restPort < 0 || restPort > 0xFFFF)
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Network, "Specified login service port ({restPort}) out of allowed range (1-65535), defaulting to 8081");
|
Log.outError(LogFilter.Network, $"Specified login service port ({restPort}) out of allowed range (1-65535), defaulting to 8081");
|
||||||
restPort = 8081;
|
restPort = 8081;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ namespace Framework.Constants
|
|||||||
DisallowPlayerAsQuestgiver = 0x08,
|
DisallowPlayerAsQuestgiver = 0x08,
|
||||||
DisplayClassChoiceRewards = 0x10,
|
DisplayClassChoiceRewards = 0x10,
|
||||||
DisplaySpecChoiceRewards = 0x20,
|
DisplaySpecChoiceRewards = 0x20,
|
||||||
RemoveFromLogOnPeridoicReset = 0x40,
|
RemoveFromLogOnPeriodicReset = 0x40,
|
||||||
AccountLevelQuest = 0x80,
|
AccountLevelQuest = 0x80,
|
||||||
LegendaryQuest = 0x100,
|
LegendaryQuest = 0x100,
|
||||||
NoGuildXp = 0x200,
|
NoGuildXp = 0x200,
|
||||||
|
|||||||
@@ -479,7 +479,7 @@ namespace Game.AI
|
|||||||
|
|
||||||
public virtual void OnCharmed(bool apply) { }
|
public virtual void OnCharmed(bool apply) { }
|
||||||
|
|
||||||
public virtual bool ShouldSparWith(Unit target) { return false; }
|
public virtual bool ShouldSparWith(Unit target) { return false; }
|
||||||
|
|
||||||
public virtual void DoAction(int action) { }
|
public virtual void DoAction(int action) { }
|
||||||
public virtual uint GetData(uint id = 0) { return 0; }
|
public virtual uint GetData(uint id = 0) { return 0; }
|
||||||
|
|||||||
@@ -1328,7 +1328,7 @@ namespace Game.Achievements
|
|||||||
|
|
||||||
if (!_achievementRewards.ContainsKey(id))
|
if (!_achievementRewards.ContainsKey(id))
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Sql, "Table `achievement_reward_locale` (ID: {id}) contains locale strings for a non-existing achievement reward.");
|
Log.outError(LogFilter.Sql, $"Table `achievement_reward_locale` (ID: {id}) contains locale strings for a non-existing achievement reward.");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9557,7 +9557,7 @@ namespace Game
|
|||||||
var response = choice.Responses.Find(playerChoiceResponse => { return playerChoiceResponse.ResponseId == responseId; });
|
var response = choice.Responses.Find(playerChoiceResponse => { return playerChoiceResponse.ResponseId == responseId; });
|
||||||
if (response == null)
|
if (response == null)
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Sql, "Table `playerchoice_response_maw_power` references non-existing ResponseId: {responseId} for ChoiceId {choiceId}, skipped");
|
Log.outError(LogFilter.Sql, $"Table `playerchoice_response_maw_power` references non-existing ResponseId: {responseId} for ChoiceId {choiceId}, skipped");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ namespace Game
|
|||||||
RaceUnlockRequirement raceExpansionRequirement = Global.ObjectMgr.GetRaceUnlockRequirement(charCreate.CreateInfo.RaceId);
|
RaceUnlockRequirement raceExpansionRequirement = Global.ObjectMgr.GetRaceUnlockRequirement(charCreate.CreateInfo.RaceId);
|
||||||
if (raceExpansionRequirement == null)
|
if (raceExpansionRequirement == null)
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Player, "Account {GetAccountId()} tried to create character with unavailable race {charCreate.CreateInfo.RaceId}");
|
Log.outError(LogFilter.Player, $"Account {GetAccountId()} tried to create character with unavailable race {charCreate.CreateInfo.RaceId}");
|
||||||
SendCharCreate(ResponseCodes.AccountCreateFailed);
|
SendCharCreate(ResponseCodes.AccountCreateFailed);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ namespace Game
|
|||||||
Player player = GetPlayer();
|
Player player = GetPlayer();
|
||||||
if (player.IsInFlight())
|
if (player.IsInFlight())
|
||||||
{
|
{
|
||||||
Log.outDebug(LogFilter.Network, "HandleAreaTriggerOpcode: Player '{0}' (GUID: {1}) in flight, ignore Area Trigger ID:{2}",
|
Log.outDebug(LogFilter.Network, "HandleAreaTrigger: Player '{0}' (GUID: {1}) in flight, ignore Area Trigger ID:{2}",
|
||||||
player.GetName(), player.GetGUID().ToString(), packet.AreaTriggerID);
|
player.GetName(), player.GetGUID().ToString(), packet.AreaTriggerID);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -178,14 +178,14 @@ namespace Game
|
|||||||
AreaTriggerRecord atEntry = CliDB.AreaTriggerStorage.LookupByKey(packet.AreaTriggerID);
|
AreaTriggerRecord atEntry = CliDB.AreaTriggerStorage.LookupByKey(packet.AreaTriggerID);
|
||||||
if (atEntry == null)
|
if (atEntry == null)
|
||||||
{
|
{
|
||||||
Log.outDebug(LogFilter.Network, "HandleAreaTriggerOpcode: Player '{0}' (GUID: {1}) send unknown (by DBC) Area Trigger ID:{2}",
|
Log.outDebug(LogFilter.Network, "HandleAreaTrigger: Player '{0}' (GUID: {1}) send unknown (by DBC) Area Trigger ID:{2}",
|
||||||
player.GetName(), player.GetGUID().ToString(), packet.AreaTriggerID);
|
player.GetName(), player.GetGUID().ToString(), packet.AreaTriggerID);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (packet.Entered && !player.IsInAreaTriggerRadius(atEntry))
|
if (packet.Entered && !player.IsInAreaTriggerRadius(atEntry))
|
||||||
{
|
{
|
||||||
Log.outDebug(LogFilter.Network, "HandleAreaTriggerOpcode: Player '{0}' ({1}) too far, ignore Area Trigger ID: {2}",
|
Log.outDebug(LogFilter.Network, "HandleAreaTrigger: Player '{0}' ({1}) too far, ignore Area Trigger ID: {2}",
|
||||||
player.GetName(), player.GetGUID().ToString(), packet.AreaTriggerID);
|
player.GetName(), player.GetGUID().ToString(), packet.AreaTriggerID);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -674,7 +674,7 @@ namespace Game
|
|||||||
// prevent tampered movement data
|
// prevent tampered movement data
|
||||||
if (setModMovementForceMagnitudeAck.Ack.Status.Guid != mover.GetGUID())
|
if (setModMovementForceMagnitudeAck.Ack.Status.Guid != mover.GetGUID())
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Network, "HandleSetModMovementForceMagnitudeAck: guid error, expected {mover.GetGUID().ToString()}, got {setModMovementForceMagnitudeAck.Ack.Status.guid.ToString()}");
|
Log.outError(LogFilter.Network, $"HandleSetModMovementForceMagnitudeAck: guid error, expected {mover.GetGUID()}, got {setModMovementForceMagnitudeAck.Ack.Status.Guid}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ namespace Game
|
|||||||
if (criteria == null)
|
if (criteria == null)
|
||||||
{
|
{
|
||||||
// Removing non-existing criteria data for all characters
|
// Removing non-existing criteria data for all characters
|
||||||
Log.outError(LogFilter.Player, "Non-existing quest objective criteria {criteriaId} data has been removed from the table `character_queststatus_objectives_criteria_progress`.");
|
Log.outError(LogFilter.Player, $"Non-existing quest objective criteria {criteriaId} data has been removed from the table `character_queststatus_objectives_criteria_progress`.");
|
||||||
|
|
||||||
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_INVALID_QUEST_PROGRESS_CRITERIA);
|
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.DEL_INVALID_QUEST_PROGRESS_CRITERIA);
|
||||||
stmt.AddValue(0, criteriaId);
|
stmt.AddValue(0, criteriaId);
|
||||||
@@ -234,7 +234,7 @@ namespace Game
|
|||||||
|
|
||||||
referencePlayer.KillCreditCriteriaTreeObjective(questObjective);
|
referencePlayer.KillCreditCriteriaTreeObjective(questObjective);
|
||||||
|
|
||||||
Log.outInfo(LogFilter.Player, "QuestObjectiveCriteriaMgr.CompletedObjective({questObjective.ID}). {GetOwnerInfo()}");
|
Log.outInfo(LogFilter.Player, $"QuestObjectiveCriteriaMgr.CompletedObjective({questObjective.Id}). {GetOwnerInfo()}");
|
||||||
|
|
||||||
_completedObjectives.Add(questObjective.Id);
|
_completedObjectives.Add(questObjective.Id);
|
||||||
}
|
}
|
||||||
@@ -277,7 +277,7 @@ namespace Game
|
|||||||
|
|
||||||
if (HasCompletedObjective(objective))
|
if (HasCompletedObjective(objective))
|
||||||
{
|
{
|
||||||
Log.outTrace(LogFilter.Player, "QuestObjectiveCriteriaMgr.CanUpdateCriteriaTree: (Id: {criteria.ID} Type {criteria.Entry.Type} Quest Objective {objective.ID}) Objective already completed");
|
Log.outTrace(LogFilter.Player, $"QuestObjectiveCriteriaMgr.CanUpdateCriteriaTree: (Id: {criteria.Id} Type {criteria.Entry.Type} Quest Objective {objective.Id}) Objective already completed");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user