diff options
author | Nay <dnpd.dd@gmail.com> | 2013-02-20 01:17:00 +0000 |
---|---|---|
committer | Nay <dnpd.dd@gmail.com> | 2013-02-20 01:17:27 +0000 |
commit | 65258666e03769cb7b1554d88e8c7b5820f5cdfa (patch) | |
tree | dc8a86e88034ffbda77044e4371e6ec59f4d9ac6 /src/server/game/Globals/ObjectMgr.cpp | |
parent | 4e59dab7032112da6cdf98d7ae3260afd10c3760 (diff) |
Core/NPCs: Fix some equipment issues introduced with 028c72a9f2c606e8af3
Also changed equips defaults to 0 (no equipment) instead of 1.
It seems that some parts of the original commit were reverted locally, my bad.
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 92424ec5c33..0e657c5ea9e 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1467,7 +1467,7 @@ void ObjectMgr::LoadCreatures() data.id = entry; data.mapid = fields[2].GetUInt16(); data.displayid = fields[3].GetUInt32(); - data.equipmentId = fields[4].GetInt32(); + data.equipmentId = fields[4].GetInt8(); data.posX = fields[5].GetFloat(); data.posY = fields[6].GetFloat(); data.posZ = fields[7].GetFloat(); @@ -1509,13 +1509,13 @@ void ObjectMgr::LoadCreatures() if (!ok) continue; - // -1 random, 0 no equipment, 1 is default (may or may not have equipment) + // -1 random, 0 no equipment, if (data.equipmentId != 0) { - if (!GetEquipmentInfo(data.id, data.equipmentId) && data.equipmentId != 1) + if (!GetEquipmentInfo(data.id, data.equipmentId)) { sLog->outError(LOG_FILTER_SQL, "Table `creature` have creature (Entry: %u) with equipment_id %u not found in table `creature_equip_template`, set to no equipment.", data.id, data.equipmentId); - data.equipmentId = 1; + data.equipmentId = 0; } } @@ -1689,7 +1689,7 @@ uint32 ObjectMgr::AddCreData(uint32 entry, uint32 /*team*/, uint32 mapId, float data.id = entry; data.mapid = mapId; data.displayid = 0; - data.equipmentId = 1; + data.equipmentId = 0; data.posX = x; data.posY = y; data.posZ = z; |