aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities/Conversation
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2018-12-09 14:45:03 +0100
committerShauren <shauren.trinity@gmail.com>2018-12-09 14:45:03 +0100
commitf94deace764f0b8d99249760d2bc2e85c891c387 (patch)
tree4c7c56f34768fc7aef05268061a12845c5bf67ce /src/server/game/Entities/Conversation
parent8725eec9c1c15f3e76bd9d524d4a5d8d0b3f0a44 (diff)
parenta70030ff252b266d12023ffada2a309409c1ccdb (diff)
Merge branch 'bfa'
Diffstat (limited to 'src/server/game/Entities/Conversation')
-rw-r--r--src/server/game/Entities/Conversation/Conversation.cpp7
-rw-r--r--src/server/game/Entities/Conversation/Conversation.h9
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;
};