Scripts/Commands: Fix crash caused by .set npc model
Port From (https://github.com/TrinityCore/TrinityCore/commit/ff2cd4a0322fc2942323702a37844b0cfa963ce4)
This commit is contained in:
@@ -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