aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Miscellaneous/Language.h2
-rw-r--r--src/server/scripts/Commands/cs_modify.cpp2
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp7
3 files changed, 9 insertions, 2 deletions
diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h
index 4db3b72c31d..1ee3866c201 100644
--- a/src/server/game/Miscellaneous/Language.h
+++ b/src/server/game/Miscellaneous/Language.h
@@ -362,7 +362,7 @@ enum TrinityStrings
LANG_COMMAND_MODIFY_ARENA = 306,
LANG_COMMAND_FACTION_NOTFOUND = 307,
LANG_COMMAND_FACTION_UNKNOWN = 308,
- LANG_COMMAND_FACTION_INVPARAM = 309,
+ LANG_COMMAND_INVALID_PARAM = 309,
LANG_COMMAND_FACTION_DELTA = 310,
LANG_FACTION_LIST = 311,
LANG_FACTION_VISIBLE = 312,
diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp
index a0eaa8aea32..804d6736455 100644
--- a/src/server/scripts/Commands/cs_modify.cpp
+++ b/src/server/scripts/Commands/cs_modify.cpp
@@ -734,7 +734,7 @@ public:
if (rankThresholdItr == end)
{
- handler->PSendSysMessage(LANG_COMMAND_FACTION_INVPARAM, rankTxt);
+ handler->PSendSysMessage(LANG_COMMAND_INVALID_PARAM, rankTxt);
handler->SetSentErrorMessage(true);
return false;
}
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index a2e77968346..0c82ee14b7f 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -879,6 +879,13 @@ public:
return false;
}
+ if (!sCreatureDisplayInfoStore.LookupEntry(displayId))
+ {
+ handler->PSendSysMessage(LANG_COMMAND_INVALID_PARAM, args);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
+
creature->SetDisplayId(displayId);
creature->SetNativeDisplayId(displayId);