aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index 5c9d5ee87ed..9856a77b61f 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -596,16 +596,13 @@ public:
// Update in memory..
if (CreatureTemplate const* cinfo = creature->GetCreatureTemplate())
- {
const_cast<CreatureTemplate*>(cinfo)->faction = factionId;
- }
// ..and DB
PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_FACTION);
stmt->setUInt16(0, uint16(factionId));
- stmt->setUInt16(1, uint16(factionId));
- stmt->setUInt32(2, creature->GetEntry());
+ stmt->setUInt32(1, creature->GetEntry());
WorldDatabase.Execute(stmt);