Scripts/Commands: Fix crash caused by .set npc model
Port From (https://github.com/TrinityCore/TrinityCore/commit/ff2cd4a0322fc2942323702a37844b0cfa963ce4)
This commit is contained in:
@@ -375,7 +375,7 @@ namespace Framework.Constants
|
||||
CommandModifyArena = 306,
|
||||
CommandFactionNotfound = 307,
|
||||
CommandFactionUnknown = 308,
|
||||
CommandFactionInvparam = 309,
|
||||
CommandInvalidParam = 309,
|
||||
CommandFactionDelta = 310,
|
||||
FactionList = 311,
|
||||
FactionVisible = 312,
|
||||
|
||||
@@ -425,7 +425,7 @@ namespace Game.Chat
|
||||
|
||||
if (i == ReputationMgr.ReputationRankThresholds.Length - 1)
|
||||
{
|
||||
handler.SendSysMessage(CypherStrings.CommandFactionInvparam, rankTxt);
|
||||
handler.SendSysMessage(CypherStrings.CommandInvalidParam, rankTxt);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1219,6 +1219,12 @@ namespace Game.Chat
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!CliDB.CreatureDisplayInfoStorage.ContainsKey(displayId))
|
||||
{
|
||||
handler.SendSysMessage(CypherStrings.CommandInvalidParam, args);
|
||||
return false;
|
||||
}
|
||||
|
||||
creature.SetDisplayId(displayId);
|
||||
creature.SetNativeDisplayId(displayId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user