diff options
| author | Shauren <shauren.trinity@gmail.com> | 2018-10-04 18:50:21 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2018-11-05 00:00:34 +0100 |
| commit | 0a779bd791fb63b2fc1663206279c7eaa9c02c6f (patch) | |
| tree | cf13cec2eaab909646f278242981dd51349fddfd /src/server/game/Entities/Conversation | |
| parent | 7512ffb0587eccd8fbb2a2841900d572056dbae3 (diff) | |
Core/PacketIO: Updated packet structures to 8.0.1
Diffstat (limited to 'src/server/game/Entities/Conversation')
| -rw-r--r-- | src/server/game/Entities/Conversation/Conversation.cpp | 7 | ||||
| -rw-r--r-- | src/server/game/Entities/Conversation/Conversation.h | 9 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/server/game/Entities/Conversation/Conversation.cpp b/src/server/game/Entities/Conversation/Conversation.cpp index 13339f3169f..0445f8ff6bc 100644 --- a/src/server/game/Entities/Conversation/Conversation.cpp +++ b/src/server/game/Entities/Conversation/Conversation.cpp @@ -30,7 +30,8 @@ Conversation::Conversation() : WorldObject(false), _duration(0) m_objectType |= TYPEMASK_CONVERSATION; m_objectTypeId = TYPEID_CONVERSATION; - m_updateFlag = UPDATEFLAG_STATIONARY_POSITION; + m_updateFlag.Stationary = true; + m_updateFlag.Conversation = true; m_valuesCount = CONVERSATION_END; _dynamicValuesCount = CONVERSATION_DYNAMIC_END; @@ -123,13 +124,15 @@ bool Conversation::Create(ObjectGuid::LowType lowGuid, uint32 conversationEntry, SetUInt32Value(CONVERSATION_LAST_LINE_END_TIME, conversationTemplate->LastLineEndTime); _duration = conversationTemplate->LastLineEndTime; + _textureKitId = conversationTemplate->TextureKitId; for (uint16 actorIndex = 0; actorIndex < conversationTemplate->Actors.size(); ++actorIndex) { if (ConversationActorTemplate const* actor = conversationTemplate->Actors[actorIndex]) { ConversationDynamicFieldActor actorField; - actorField.ActorTemplate = *actor; + actorField.ActorTemplate.CreatureId = actor->CreatureId; + actorField.ActorTemplate.CreatureModelId = actor->CreatureModelId; actorField.Type = ConversationDynamicFieldActor::ActorType::CreatureActor; SetDynamicStructuredValue(CONVERSATION_DYNAMIC_FIELD_ACTORS, actorIndex, &actorField); } diff --git a/src/server/game/Entities/Conversation/Conversation.h b/src/server/game/Entities/Conversation/Conversation.h index 860264b1de8..ddc44ddfea9 100644 --- a/src/server/game/Entities/Conversation/Conversation.h +++ b/src/server/game/Entities/Conversation/Conversation.h @@ -47,8 +47,11 @@ struct ConversationDynamicFieldActor union { ObjectGuid ActorGuid; - - ConversationActorTemplate ActorTemplate; + struct + { + uint32 CreatureId; + uint32 CreatureModelId; + } ActorTemplate; struct { @@ -75,6 +78,7 @@ class TC_GAME_API Conversation : public WorldObject, public GridObject<Conversat void Update(uint32 diff) override; void Remove(); int32 GetDuration() const { return _duration; } + uint32 GetTextureKitId() const { return _textureKitId; } static Conversation* CreateConversation(uint32 conversationEntry, Unit* creator, Position const& pos, GuidUnorderedSet&& participants, SpellInfo const* spellInfo = nullptr); bool Create(ObjectGuid::LowType lowGuid, uint32 conversationEntry, Map* map, Unit* creator, Position const& pos, GuidUnorderedSet&& participants, SpellInfo const* spellInfo = nullptr); @@ -95,6 +99,7 @@ class TC_GAME_API Conversation : public WorldObject, public GridObject<Conversat Position _stationaryPosition; ObjectGuid _creatorGuid; uint32 _duration; + uint32 _textureKitId; GuidUnorderedSet _participants; }; |
