diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Creature.cpp | 27 | ||||
-rw-r--r-- | src/game/ObjectMgr.cpp | 18 |
2 files changed, 43 insertions, 2 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 0627f6419fb..72d7f0212d5 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -2139,10 +2139,33 @@ bool Creature::LoadCreaturesAddon(bool reload) Mount(cainfo->mount); if (cainfo->bytes1 != 0) - SetUInt32Value(UNIT_FIELD_BYTES_1, cainfo->bytes1); + { + // 0 StandState + // 1 FreeTalentPoints Pet only, so always 0 for default creature + // 2 StandFlags + // 3 StandMiscFlags + + SetByteValue(UNIT_FIELD_BYTES_1, 0, uint8(cainfo->bytes1 & 0xFF)); + //SetByteValue(UNIT_FIELD_BYTES_1, 1, uint8((cainfo->bytes1 >> 8) & 0xFF)); + SetByteValue(UNIT_FIELD_BYTES_1, 1, 0); + SetByteValue(UNIT_FIELD_BYTES_1, 2, uint8((cainfo->bytes1 >> 16) & 0xFF)); + SetByteValue(UNIT_FIELD_BYTES_1, 3, uint8((cainfo->bytes1 >> 24) & 0xFF)); + } if (cainfo->bytes2 != 0) - SetUInt32Value(UNIT_FIELD_BYTES_2, cainfo->bytes2); + { + // 0 SheathState + // 1 Bytes2Flags + // 2 UnitRename Pet only, so always 0 for default creature + // 3 ShapeshiftForm Must be determined/set by shapeshift spell/aura + + SetByteValue(UNIT_FIELD_BYTES_2, 0, uint8(cainfo->bytes2 & 0xFF)); + SetByteValue(UNIT_FIELD_BYTES_2, 1, uint8((cainfo->bytes2 >> 8) & 0xFF)); + //SetByteValue(UNIT_FIELD_BYTES_2, 2, uint8((cainfo->bytes2 >> 16) & 0xFF)); + SetByteValue(UNIT_FIELD_BYTES_2, 2, 0); + //SetByteValue(UNIT_FIELD_BYTES_2, 3, uint8((cainfo->bytes2 >> 24) & 0xFF)); + SetByteValue(UNIT_FIELD_BYTES_2, 3, 0); + } if (cainfo->emote != 0) SetUInt32Value(UNIT_NPC_EMOTESTATE, cainfo->emote); diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 1b661bc41ba..cd43135d68a 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -802,6 +802,15 @@ void ObjectMgr::LoadCreatureAddons() if(!addon) continue; + if (addon->mount) + { + if (!sCreatureDisplayInfoStore.LookupEntry(addon->mount)) + sLog.outErrorDb("Creature (Entry %u) have invalid displayInfoId for mount (%u) defined in `creature_template_addon`.",addon->guidOrEntry, addon->mount); + } + + if (!sEmotesStore.LookupEntry(addon->emote)) + sLog.outErrorDb("Creature (Entry %u) have invalid emote (%u) defined in `creature_template_addon`.",addon->guidOrEntry, addon->emote); + ConvertCreatureAddonAuras(const_cast<CreatureDataAddon*>(addon), "creature_template_addon", "Entry"); if(!sCreatureStorage.LookupEntry<CreatureInfo>(addon->guidOrEntry)) @@ -820,6 +829,15 @@ void ObjectMgr::LoadCreatureAddons() if(!addon) continue; + if (addon->mount) + { + if (!sCreatureDisplayInfoStore.LookupEntry(addon->mount)) + sLog.outErrorDb("Creature (GUID %u) have invalid displayInfoId for mount (%u) defined in `creature_addon`.",addon->guidOrEntry, addon->mount); + } + + if (!sEmotesStore.LookupEntry(addon->emote)) + sLog.outErrorDb("Creature (GUID %u) have invalid emote (%u) defined in `creature_addon`.",addon->guidOrEntry, addon->emote); + ConvertCreatureAddonAuras(const_cast<CreatureDataAddon*>(addon), "creature_addon", "GUIDLow"); if(mCreatureDataMap.find(addon->guidOrEntry)==mCreatureDataMap.end()) |