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 29b4ed5ae64..4153a4d4283 100644
--- a/src/server/game/Miscellaneous/Language.h
+++ b/src/server/game/Miscellaneous/Language.h
@@ -340,7 +340,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 814d25fe7a1..f4f31cf4cad 100644
--- a/src/server/scripts/Commands/cs_modify.cpp
+++ b/src/server/scripts/Commands/cs_modify.cpp
@@ -770,7 +770,7 @@ public:
}
if (r >= MAX_REPUTATION_RANK)
{
- 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 cc972f6e23f..0f8e28a6942 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -837,6 +837,13 @@ public:
handler->SetSentErrorMessage(true);
return false;
}
+
+ if (!sCreatureDisplayInfoStore.LookupEntry(displayId))
+ {
+ handler->PSendSysMessage(LANG_COMMAND_INVALID_PARAM, args);
+ handler->SetSentErrorMessage(true);
+ return false;
+ }
creature->SetDisplayId(displayId);
creature->SetNativeDisplayId(displayId);