mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-05-23 07:12:24 +00:00
Rename from GetOwningEntity to GetParentEntity
This commit is contained in:
parent
e2dfa1809d
commit
f555ba8c25
@ -162,7 +162,7 @@ void BasicAttackBehavior::DoBehaviorCalculation(BehaviorContext* context, RakNet
|
||||
}
|
||||
|
||||
auto* destroyableComponent = targetEntity->GetComponent<DestroyableComponent>();
|
||||
if (!destroyableComponent || !destroyableComponent->GetOwningEntity()) {
|
||||
if (!destroyableComponent || !destroyableComponent->GetParentEntity()) {
|
||||
Game::logger->Log("BasicAttackBehavior", "No destroyable component on %llu", branch.target);
|
||||
return;
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ void BuffComponent::ApplyBuffEffect(int32_t id) {
|
||||
if (parameter.name == "max_health") {
|
||||
const auto maxHealth = parameter.value;
|
||||
|
||||
auto* destroyable = this->GetOwningEntity()->GetComponent<DestroyableComponent>();
|
||||
auto* destroyable = this->GetParentEntity()->GetComponent<DestroyableComponent>();
|
||||
|
||||
if (destroyable == nullptr) return;
|
||||
|
||||
@ -157,7 +157,7 @@ void BuffComponent::ApplyBuffEffect(int32_t id) {
|
||||
} else if (parameter.name == "max_armor") {
|
||||
const auto maxArmor = parameter.value;
|
||||
|
||||
auto* destroyable = this->GetOwningEntity()->GetComponent<DestroyableComponent>();
|
||||
auto* destroyable = this->GetParentEntity()->GetComponent<DestroyableComponent>();
|
||||
|
||||
if (destroyable == nullptr) return;
|
||||
|
||||
@ -165,13 +165,13 @@ void BuffComponent::ApplyBuffEffect(int32_t id) {
|
||||
} else if (parameter.name == "max_imagination") {
|
||||
const auto maxImagination = parameter.value;
|
||||
|
||||
auto* destroyable = this->GetOwningEntity()->GetComponent<DestroyableComponent>();
|
||||
auto* destroyable = this->GetParentEntity()->GetComponent<DestroyableComponent>();
|
||||
|
||||
if (destroyable == nullptr) return;
|
||||
|
||||
destroyable->SetMaxImagination(destroyable->GetMaxImagination() + maxImagination);
|
||||
} else if (parameter.name == "speed") {
|
||||
auto* controllablePhysicsComponent = this->GetOwningEntity()->GetComponent<ControllablePhysicsComponent>();
|
||||
auto* controllablePhysicsComponent = this->GetParentEntity()->GetComponent<ControllablePhysicsComponent>();
|
||||
if (!controllablePhysicsComponent) return;
|
||||
const auto speed = parameter.value;
|
||||
controllablePhysicsComponent->AddSpeedboost(speed);
|
||||
@ -185,7 +185,7 @@ void BuffComponent::RemoveBuffEffect(int32_t id) {
|
||||
if (parameter.name == "max_health") {
|
||||
const auto maxHealth = parameter.value;
|
||||
|
||||
auto* destroyable = this->GetOwningEntity()->GetComponent<DestroyableComponent>();
|
||||
auto* destroyable = this->GetParentEntity()->GetComponent<DestroyableComponent>();
|
||||
|
||||
if (destroyable == nullptr) return;
|
||||
|
||||
@ -193,7 +193,7 @@ void BuffComponent::RemoveBuffEffect(int32_t id) {
|
||||
} else if (parameter.name == "max_armor") {
|
||||
const auto maxArmor = parameter.value;
|
||||
|
||||
auto* destroyable = this->GetOwningEntity()->GetComponent<DestroyableComponent>();
|
||||
auto* destroyable = this->GetParentEntity()->GetComponent<DestroyableComponent>();
|
||||
|
||||
if (destroyable == nullptr) return;
|
||||
|
||||
@ -201,13 +201,13 @@ void BuffComponent::RemoveBuffEffect(int32_t id) {
|
||||
} else if (parameter.name == "max_imagination") {
|
||||
const auto maxImagination = parameter.value;
|
||||
|
||||
auto* destroyable = this->GetOwningEntity()->GetComponent<DestroyableComponent>();
|
||||
auto* destroyable = this->GetParentEntity()->GetComponent<DestroyableComponent>();
|
||||
|
||||
if (destroyable == nullptr) return;
|
||||
|
||||
destroyable->SetMaxImagination(destroyable->GetMaxImagination() - maxImagination);
|
||||
} else if (parameter.name == "speed") {
|
||||
auto* controllablePhysicsComponent = this->GetOwningEntity()->GetComponent<ControllablePhysicsComponent>();
|
||||
auto* controllablePhysicsComponent = this->GetParentEntity()->GetComponent<ControllablePhysicsComponent>();
|
||||
if (!controllablePhysicsComponent) return;
|
||||
const auto speed = parameter.value;
|
||||
controllablePhysicsComponent->RemoveSpeedboost(speed);
|
||||
@ -233,7 +233,7 @@ void BuffComponent::ReApplyBuffs() {
|
||||
}
|
||||
}
|
||||
|
||||
Entity* BuffComponent::GetOwningEntity() const {
|
||||
Entity* BuffComponent::GetParentEntity() const {
|
||||
return m_OwningEntity;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
|
||||
~BuffComponent();
|
||||
|
||||
Entity* GetOwningEntity() const;
|
||||
Entity* GetParentEntity() const;
|
||||
|
||||
void LoadFromXml(tinyxml2::XMLDocument* doc) override;
|
||||
|
||||
|
@ -20,7 +20,7 @@ public:
|
||||
* Gets the owner of this component
|
||||
* @return the owner of this component
|
||||
*/
|
||||
Entity* GetOwningEntity() const { return m_OwningEntity; };
|
||||
Entity* GetParentEntity() const { return m_OwningEntity; };
|
||||
|
||||
/**
|
||||
* Event called when this component is being used, e.g. when some entity interacted with it
|
||||
|
@ -872,7 +872,7 @@ void DestroyableComponent::SetStatusImmunity(
|
||||
}
|
||||
|
||||
void DestroyableComponent::FixStats() {
|
||||
auto* entity = GetOwningEntity();
|
||||
auto* entity = GetParentEntity();
|
||||
|
||||
if (entity == nullptr) return;
|
||||
|
||||
|
@ -261,7 +261,7 @@ void InventoryComponent::AddItem(
|
||||
}
|
||||
|
||||
if (slot == -1) {
|
||||
auto* player = dynamic_cast<Player*>(GetOwningEntity());
|
||||
auto* player = dynamic_cast<Player*>(GetParentEntity());
|
||||
|
||||
if (player == nullptr) {
|
||||
return;
|
||||
@ -687,7 +687,7 @@ void InventoryComponent::UpdateXml(tinyxml2::XMLDocument* document) {
|
||||
itemElement->SetAttribute("sk", item->GetSubKey());
|
||||
|
||||
// Begin custom xml
|
||||
itemElement->SetAttribute("parent", item->GetOwningEntity());
|
||||
itemElement->SetAttribute("parent", item->GetParentEntity());
|
||||
// End custom xml
|
||||
|
||||
for (auto* data : item->GetConfig()) {
|
||||
@ -913,7 +913,7 @@ void InventoryComponent::UnEquipItem(Item* item) {
|
||||
|
||||
// Trigger property event
|
||||
if (PropertyManagementComponent::Instance() != nullptr && item->GetCount() > 0 && Inventory::FindInventoryTypeForLot(item->GetLot()) == MODELS) {
|
||||
PropertyManagementComponent::Instance()->GetOwningEntity()->OnZonePropertyModelRemovedWhileEquipped(m_OwningEntity);
|
||||
PropertyManagementComponent::Instance()->GetParentEntity()->OnZonePropertyModelRemovedWhileEquipped(m_OwningEntity);
|
||||
dZoneManager::Instance()->GetZoneControlObject()->OnZonePropertyModelRemovedWhileEquipped(m_OwningEntity);
|
||||
}
|
||||
}
|
||||
@ -1356,7 +1356,7 @@ std::vector<uint32_t> InventoryComponent::FindBuffs(Item* item, bool castOnEquip
|
||||
}
|
||||
|
||||
// If item is not a proxy, add its buff to the added buffs.
|
||||
if (item->GetOwningEntity() == LWOOBJID_EMPTY) buffs.push_back(static_cast<uint32_t>(entry.behaviorID));
|
||||
if (item->GetParentEntity() == LWOOBJID_EMPTY) buffs.push_back(static_cast<uint32_t>(entry.behaviorID));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1442,7 +1442,7 @@ std::vector<Item*> InventoryComponent::FindProxies(const LWOOBJID parent) {
|
||||
for (const auto& pair : inventory->GetItems()) {
|
||||
auto* item = pair.second;
|
||||
|
||||
if (item->GetOwningEntity() == parent) {
|
||||
if (item->GetParentEntity() == parent) {
|
||||
proxies.push_back(item);
|
||||
}
|
||||
}
|
||||
@ -1479,7 +1479,7 @@ bool InventoryComponent::IsParentValid(Item* root) {
|
||||
for (const auto& candidate : items) {
|
||||
auto* item = candidate.second;
|
||||
|
||||
if (item->GetOwningEntity() == id) {
|
||||
if (item->GetParentEntity() == id) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -1497,7 +1497,7 @@ void InventoryComponent::CheckProxyIntegrity() {
|
||||
for (const auto& candidate : items) {
|
||||
auto* item = candidate.second;
|
||||
|
||||
const auto parent = item->GetOwningEntity();
|
||||
const auto parent = item->GetParentEntity();
|
||||
|
||||
if (parent == LWOOBJID_EMPTY) {
|
||||
continue;
|
||||
@ -1526,7 +1526,7 @@ void InventoryComponent::CheckProxyIntegrity() {
|
||||
{
|
||||
auto* item = candidate.second;
|
||||
|
||||
const auto parent = item->GetOwningEntity();
|
||||
const auto parent = item->GetParentEntity();
|
||||
|
||||
if (parent != LWOOBJID_EMPTY)
|
||||
{
|
||||
@ -1555,7 +1555,7 @@ void InventoryComponent::CheckProxyIntegrity() {
|
||||
}
|
||||
|
||||
void InventoryComponent::PurgeProxies(Item* item) {
|
||||
const auto root = item->GetOwningEntity();
|
||||
const auto root = item->GetParentEntity();
|
||||
|
||||
if (root != LWOOBJID_EMPTY) {
|
||||
item = FindItemById(root);
|
||||
|
@ -846,7 +846,7 @@ void PetComponent::Activate(Item* item, bool registerPet, bool fromTaming) {
|
||||
|
||||
inventoryComponent->DespawnPet();
|
||||
|
||||
m_Owner = inventoryComponent->GetOwningEntity()->GetObjectID();
|
||||
m_Owner = inventoryComponent->GetParentEntity()->GetObjectID();
|
||||
|
||||
auto* owner = GetOwner();
|
||||
|
||||
@ -910,7 +910,7 @@ void PetComponent::AddDrainImaginationTimer(Item* item, bool fromTaming) {
|
||||
auto playerInventoryComponent = playerInventory->GetComponent();
|
||||
if (!playerInventoryComponent) return;
|
||||
|
||||
auto playerEntity = playerInventoryComponent->GetOwningEntity();
|
||||
auto playerEntity = playerInventoryComponent->GetParentEntity();
|
||||
if (!playerEntity) return;
|
||||
|
||||
auto* playerDestroyableComponent = playerEntity->GetComponent<DestroyableComponent>();
|
||||
@ -929,7 +929,7 @@ void PetComponent::AddDrainImaginationTimer(Item* item, bool fromTaming) {
|
||||
// If we are out of imagination despawn the pet.
|
||||
if (playerDestroyableComponent->GetImagination() == 0) {
|
||||
this->Deactivate();
|
||||
auto playerEntity = playerDestroyableComponent->GetOwningEntity();
|
||||
auto playerEntity = playerDestroyableComponent->GetParentEntity();
|
||||
if (!playerEntity) return;
|
||||
|
||||
GameMessages::SendUseItemRequirementsResponse(playerEntity->GetObjectID(), playerEntity->GetSystemAddress(), eUseItemResponse::NoImaginationForPet);
|
||||
|
@ -1985,7 +1985,7 @@ void GameMessages::SendOpenPropertyManagment(const LWOOBJID objectId, const Syst
|
||||
CBITSTREAM;
|
||||
CMSGHEADER;
|
||||
|
||||
bitStream.Write(PropertyManagementComponent::Instance()->GetOwningEntity()->GetObjectID());
|
||||
bitStream.Write(PropertyManagementComponent::Instance()->GetParentEntity()->GetObjectID());
|
||||
bitStream.Write(eGameMessageType::OPEN_PROPERTY_MANAGEMENT);
|
||||
|
||||
if (sysAddr == UNASSIGNED_SYSTEM_ADDRESS) SEND_PACKET_BROADCAST;
|
||||
|
@ -76,7 +76,7 @@ void Inventory::SetSize(const uint32_t value) {
|
||||
|
||||
size = value;
|
||||
|
||||
GameMessages::SendSetInventorySize(component->GetOwningEntity(), type, static_cast<int>(size));
|
||||
GameMessages::SendSetInventorySize(component->GetParentEntity(), type, static_cast<int>(size));
|
||||
}
|
||||
|
||||
int32_t Inventory::FindEmptySlot() {
|
||||
|
@ -92,7 +92,7 @@ Item::Item(
|
||||
|
||||
inventory->AddManagedItem(this);
|
||||
|
||||
auto entity = inventory->GetComponent()->GetOwningEntity();
|
||||
auto entity = inventory->GetComponent()->GetParentEntity();
|
||||
GameMessages::SendAddItemToInventoryClientSync(entity, entity->GetSystemAddress(), this, id, showFlyingLoot, static_cast<int>(this->count), subKey, lootSourceType);
|
||||
|
||||
if (isModMoveAndEquip) {
|
||||
@ -100,7 +100,7 @@ Item::Item(
|
||||
|
||||
Game::logger->Log("Item", "Move and equipped (%i) from (%i)", this->lot, this->inventory->GetType());
|
||||
|
||||
EntityManager::Instance()->SerializeEntity(inventory->GetComponent()->GetOwningEntity());
|
||||
EntityManager::Instance()->SerializeEntity(inventory->GetComponent()->GetParentEntity());
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ Inventory* Item::GetInventory() const {
|
||||
return inventory;
|
||||
}
|
||||
|
||||
LWOOBJID Item::GetOwningEntity() const {
|
||||
LWOOBJID Item::GetParentEntity() const {
|
||||
return parent;
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ void Item::SetCount(const uint32_t value, const bool silent, const bool disassem
|
||||
}
|
||||
|
||||
if (!silent) {
|
||||
auto entity = inventory->GetComponent()->GetOwningEntity();
|
||||
auto entity = inventory->GetComponent()->GetParentEntity();
|
||||
|
||||
if (value > count) {
|
||||
GameMessages::SendAddItemToInventoryClientSync(entity, entity->GetSystemAddress(), this, id, showFlyingLoot, delta, LWOOBJID_EMPTY, lootSourceType);
|
||||
@ -262,7 +262,7 @@ bool Item::Consume() {
|
||||
|
||||
Game::logger->LogDebug("Item", "Consumed LOT (%i) itemID (%llu). Success=(%d)", lot, id, success);
|
||||
|
||||
GameMessages::SendUseItemResult(inventory->GetComponent()->GetOwningEntity(), lot, success);
|
||||
GameMessages::SendUseItemResult(inventory->GetComponent()->GetParentEntity(), lot, success);
|
||||
|
||||
if (success) {
|
||||
inventory->GetComponent()->RemoveItem(lot, 1);
|
||||
@ -284,7 +284,7 @@ void Item::UseNonEquip(Item* item) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto* playerEntity = playerInventoryComponent->GetOwningEntity();
|
||||
auto* playerEntity = playerInventoryComponent->GetParentEntity();
|
||||
if (!playerEntity) {
|
||||
Game::logger->LogDebug("Item", "no player entity attached to inventory? item id is %llu", this->GetId());
|
||||
return;
|
||||
@ -314,8 +314,8 @@ void Item::UseNonEquip(Item* item) {
|
||||
|
||||
auto success = !packages.empty();
|
||||
if (success) {
|
||||
if (this->GetPreconditionExpression()->Check(playerInventoryComponent->GetOwningEntity())) {
|
||||
auto* entityParent = playerInventoryComponent->GetOwningEntity();
|
||||
if (this->GetPreconditionExpression()->Check(playerInventoryComponent->GetParentEntity())) {
|
||||
auto* entityParent = playerInventoryComponent->GetParentEntity();
|
||||
// Roll the loot for all the packages then see if it all fits. If it fits, give it to the player, otherwise don't.
|
||||
std::unordered_map<LOT, int32_t> rolledLoot{};
|
||||
for (auto& pack : packages) {
|
||||
@ -331,15 +331,15 @@ void Item::UseNonEquip(Item* item) {
|
||||
}
|
||||
}
|
||||
if (playerInventoryComponent->HasSpaceForLoot(rolledLoot)) {
|
||||
LootGenerator::Instance().GiveLoot(playerInventoryComponent->GetOwningEntity(), rolledLoot, eLootSourceType::CONSUMPTION);
|
||||
LootGenerator::Instance().GiveLoot(playerInventoryComponent->GetParentEntity(), rolledLoot, eLootSourceType::CONSUMPTION);
|
||||
item->SetCount(item->GetCount() - 1);
|
||||
} else {
|
||||
success = false;
|
||||
}
|
||||
} else {
|
||||
GameMessages::SendUseItemRequirementsResponse(
|
||||
playerInventoryComponent->GetOwningEntity()->GetObjectID(),
|
||||
playerInventoryComponent->GetOwningEntity()->GetSystemAddress(),
|
||||
playerInventoryComponent->GetParentEntity()->GetObjectID(),
|
||||
playerInventoryComponent->GetParentEntity()->GetSystemAddress(),
|
||||
eUseItemResponse::FailedPrecondition
|
||||
);
|
||||
success = false;
|
||||
@ -347,7 +347,7 @@ void Item::UseNonEquip(Item* item) {
|
||||
}
|
||||
}
|
||||
Game::logger->LogDebug("Item", "Player %llu %s used item %i", playerEntity->GetObjectID(), success ? "successfully" : "unsuccessfully", thisLot);
|
||||
GameMessages::SendUseItemResult(playerInventoryComponent->GetOwningEntity(), thisLot, success);
|
||||
GameMessages::SendUseItemResult(playerInventoryComponent->GetParentEntity(), thisLot, success);
|
||||
}
|
||||
}
|
||||
|
||||
@ -360,7 +360,7 @@ void Item::Disassemble(const eInventoryType inventoryType) {
|
||||
if (GetInventory()) {
|
||||
auto inventoryComponent = GetInventory()->GetComponent();
|
||||
if (inventoryComponent) {
|
||||
auto entity = inventoryComponent->GetOwningEntity();
|
||||
auto entity = inventoryComponent->GetParentEntity();
|
||||
if (entity) entity->SetVar<std::string>(u"currentModifiedBuild", modStr);
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ public:
|
||||
* Returns the parent of this item, e.g. for proxy items
|
||||
* @return the parent of this item
|
||||
*/
|
||||
LWOOBJID GetOwningEntity() const;
|
||||
LWOOBJID GetParentEntity() const;
|
||||
|
||||
/**
|
||||
* Sets the subkey for this item, e.g. for pets
|
||||
|
@ -15,7 +15,7 @@ ItemSet::ItemSet(const uint32_t id, InventoryComponent* inventoryComponent) {
|
||||
this->m_ID = id;
|
||||
this->m_InventoryComponent = inventoryComponent;
|
||||
|
||||
this->m_PassiveAbilities = ItemSetPassiveAbility::FindAbilities(id, m_InventoryComponent->GetOwningEntity(), this);
|
||||
this->m_PassiveAbilities = ItemSetPassiveAbility::FindAbilities(id, m_InventoryComponent->GetParentEntity(), this);
|
||||
|
||||
auto query = CDClientDatabase::CreatePreppedStmt(
|
||||
"SELECT skillSetWith2, skillSetWith3, skillSetWith4, skillSetWith5, skillSetWith6, itemIDs FROM ItemSets WHERE setID = ?;");
|
||||
@ -125,8 +125,8 @@ void ItemSet::OnEquip(const LOT lot) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto* skillComponent = m_InventoryComponent->GetOwningEntity()->GetComponent<SkillComponent>();
|
||||
auto* missionComponent = m_InventoryComponent->GetOwningEntity()->GetComponent<MissionComponent>();
|
||||
auto* skillComponent = m_InventoryComponent->GetParentEntity()->GetComponent<SkillComponent>();
|
||||
auto* missionComponent = m_InventoryComponent->GetParentEntity()->GetComponent<MissionComponent>();
|
||||
|
||||
for (const auto skill : skillSet) {
|
||||
auto* skillTable = CDClientManager::Instance().GetTable<CDSkillBehaviorTable>();
|
||||
@ -135,7 +135,7 @@ void ItemSet::OnEquip(const LOT lot) {
|
||||
|
||||
missionComponent->Progress(eMissionTaskType::USE_SKILL, skill);
|
||||
|
||||
skillComponent->HandleUnmanaged(behaviorId, m_InventoryComponent->GetOwningEntity()->GetObjectID());
|
||||
skillComponent->HandleUnmanaged(behaviorId, m_InventoryComponent->GetParentEntity()->GetObjectID());
|
||||
}
|
||||
}
|
||||
|
||||
@ -158,14 +158,14 @@ void ItemSet::OnUnEquip(const LOT lot) {
|
||||
return;
|
||||
}
|
||||
|
||||
const auto* skillComponent = m_InventoryComponent->GetOwningEntity()->GetComponent<SkillComponent>();
|
||||
const auto* skillComponent = m_InventoryComponent->GetParentEntity()->GetComponent<SkillComponent>();
|
||||
|
||||
for (const auto skill : skillSet) {
|
||||
auto* skillTable = CDClientManager::Instance().GetTable<CDSkillBehaviorTable>();
|
||||
|
||||
const auto behaviorId = skillTable->GetSkillByID(skill).behaviorID;
|
||||
|
||||
skillComponent->HandleUnCast(behaviorId, m_InventoryComponent->GetOwningEntity()->GetObjectID());
|
||||
skillComponent->HandleUnCast(behaviorId, m_InventoryComponent->GetParentEntity()->GetObjectID());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -204,7 +204,7 @@ bool Mission::IsValidMission(const uint32_t missionId, CDMissions& info) {
|
||||
}
|
||||
|
||||
Entity* Mission::GetAssociate() const {
|
||||
return m_MissionComponent->GetOwningEntity();
|
||||
return m_MissionComponent->GetParentEntity();
|
||||
}
|
||||
|
||||
User* Mission::GetUser() const {
|
||||
|
@ -47,11 +47,11 @@ void ControlBehaviors::RequestUpdatedID(int32_t behaviorID, ModelBehaviorCompone
|
||||
// args.InsertValue("behaviorID", behaviorIDString);
|
||||
|
||||
// AMFStringValue* objectIDAsString = new AMFStringValue();
|
||||
// objectIDAsString->SetValue(std::to_string(modelComponent->GetOwningEntity()->GetObjectID()));
|
||||
// objectIDAsString->SetValue(std::to_string(modelComponent->GetParentEntity()->GetObjectID()));
|
||||
// args.InsertValue("objectID", objectIDAsString);
|
||||
|
||||
// GameMessages::SendUIMessageServerToSingleClient(modelOwner, sysAddr, "UpdateBehaviorID", &args);
|
||||
// ControlBehaviors::SendBehaviorListToClient(modelComponent->GetOwningEntity(), sysAddr, modelOwner);
|
||||
// ControlBehaviors::SendBehaviorListToClient(modelComponent->GetParentEntity(), sysAddr, modelOwner);
|
||||
// });
|
||||
// }
|
||||
}
|
||||
@ -74,7 +74,7 @@ void ControlBehaviors::SendBehaviorListToClient(Entity* modelEntity, const Syste
|
||||
*/
|
||||
|
||||
behaviorsToSerialize.Insert("behaviors");
|
||||
behaviorsToSerialize.Insert("objectID", std::to_string(modelComponent->GetOwningEntity()->GetObjectID()));
|
||||
behaviorsToSerialize.Insert("objectID", std::to_string(modelComponent->GetParentEntity()->GetObjectID()));
|
||||
|
||||
GameMessages::SendUIMessageServerToSingleClient(modelOwner, sysAddr, "UpdateBehaviorList", behaviorsToSerialize);
|
||||
}
|
||||
@ -197,7 +197,7 @@ void ControlBehaviors::SendBehaviorBlocksToClient(ModelBehaviorComponent* modelC
|
||||
// uiArray->InsertValue("x", xPosition);
|
||||
|
||||
// thisStrip->InsertValue("ui", uiArray);
|
||||
// targetObjectID = modelComponent->GetOwningEntity()->GetObjectID();
|
||||
// targetObjectID = modelComponent->GetParentEntity()->GetObjectID();
|
||||
// behaviorID = modelBehavior->GetBehaviorID();
|
||||
|
||||
// AMFArrayValue* stripSerialize = new AMFArrayValue();
|
||||
@ -276,7 +276,7 @@ void ControlBehaviors::MoveToInventory(ModelBehaviorComponent* modelComponent, c
|
||||
|
||||
MoveToInventoryMessage moveToInventoryMessage(arguments);
|
||||
|
||||
SendBehaviorListToClient(modelComponent->GetOwningEntity(), sysAddr, modelOwner);
|
||||
SendBehaviorListToClient(modelComponent->GetParentEntity(), sysAddr, modelOwner);
|
||||
}
|
||||
|
||||
void ControlBehaviors::ProcessCommand(Entity* modelEntity, const SystemAddress& sysAddr, AMFArrayValue* arguments, std::string command, Entity* modelOwner) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user