mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-17 20:24:21 +00:00
feedback
This commit is contained in:
@@ -180,7 +180,7 @@ void MovementAIComponent::Update(const float deltaTime) {
|
|||||||
SetPath(waypoints);
|
SetPath(waypoints);
|
||||||
} else if (m_Path->pathBehavior == PathBehavior::Once) {
|
} else if (m_Path->pathBehavior == PathBehavior::Once) {
|
||||||
// In this case we intended to follow a path and once we've followed it we camp there, otherwise we'd just wander home again.
|
// In this case we intended to follow a path and once we've followed it we camp there, otherwise we'd just wander home again.
|
||||||
m_BaseCombatAI->SetStartingPosition(m_SourcePosition);
|
if (m_BaseCombatAI) m_BaseCombatAI->SetStartingPosition(m_SourcePosition);
|
||||||
Stop();
|
Stop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -459,7 +459,7 @@ void MovementAIComponent::RunWaypointCommands(uint32_t waypointNum) {
|
|||||||
if (inventoryComponent) {
|
if (inventoryComponent) {
|
||||||
// items should always exist
|
// items should always exist
|
||||||
auto* const item = inventoryComponent->GetInventory(eInventoryType::ITEMS)->FindItemBySlot(0);
|
auto* const item = inventoryComponent->GetInventory(eInventoryType::ITEMS)->FindItemBySlot(0);
|
||||||
inventoryComponent->EquipItem(item);
|
if (item) inventoryComponent->EquipItem(item);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -468,19 +468,19 @@ void MovementAIComponent::RunWaypointCommands(uint32_t waypointNum) {
|
|||||||
if (inventoryComponent) {
|
if (inventoryComponent) {
|
||||||
// items should always exist
|
// items should always exist
|
||||||
auto* const item = inventoryComponent->GetInventory(eInventoryType::ITEMS)->FindItemBySlot(0);
|
auto* const item = inventoryComponent->GetInventory(eInventoryType::ITEMS)->FindItemBySlot(0);
|
||||||
inventoryComponent->UnEquipItem(item);
|
if (item) inventoryComponent->UnEquipItem(item);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// case eWaypointCommandType::DELAY: {
|
case eWaypointCommandType::DELAY: {
|
||||||
// Pause(GeneralUtils::TryParse<float>(data).value_or(0.0f));
|
// Pause(GeneralUtils::TryParse<float>(data).value_or(0.0f));
|
||||||
// break;
|
break;
|
||||||
// }
|
}
|
||||||
case eWaypointCommandType::EMOTE: {
|
case eWaypointCommandType::EMOTE: {
|
||||||
// m_Delay = RenderComponent::GetAnimationTime(m_Parent, data);
|
// m_Delay = RenderComponent::GetAnimationTime(m_Parent, data);
|
||||||
// const auto emoteID = GeneralUtils::TryParse<uint32_t>(data);
|
// const auto emoteID = GeneralUtils::TryParse<uint32_t>(data);
|
||||||
// if (emoteID) GameMessages::SendPlayEmote(m_Parent->GetObjectID(), emoteID.value(), LWOOBJID_EMPTY, UNASSIGNED_SYSTEM_ADDRESS);
|
// if (emoteID) GameMessages::SendPlayEmote(m_Parent->GetObjectID(), emoteID.value(), LWOOBJID_EMPTY, UNASSIGNED_SYSTEM_ADDRESS);
|
||||||
// break;
|
break;
|
||||||
}
|
}
|
||||||
case eWaypointCommandType::TELEPORT: break;
|
case eWaypointCommandType::TELEPORT: break;
|
||||||
case eWaypointCommandType::PATH_SPEED: m_BaseSpeed = GetBaseSpeed(m_Parent->GetLOT()) * GeneralUtils::TryParse<float>(data).value_or(1.0f); break;
|
case eWaypointCommandType::PATH_SPEED: m_BaseSpeed = GetBaseSpeed(m_Parent->GetLOT()) * GeneralUtils::TryParse<float>(data).value_or(1.0f); break;
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ void Zone::LoadZoneIntoMemory() {
|
|||||||
for (const Path& path : m_Paths) {
|
for (const Path& path : m_Paths) {
|
||||||
if (path.pathType != PathType::Spawner) continue;
|
if (path.pathType != PathType::Spawner) continue;
|
||||||
SpawnerInfo info{};
|
SpawnerInfo info{};
|
||||||
for (int i = 0; i < path.pathWaypoints.size(); i++) {
|
for (size_t i = 0; i < path.pathWaypoints.size(); i++) {
|
||||||
const auto& waypoint = path.pathWaypoints[i];
|
const auto& waypoint = path.pathWaypoints[i];
|
||||||
SpawnerNode* node = new SpawnerNode();
|
SpawnerNode* node = new SpawnerNode();
|
||||||
node->position = waypoint.position;
|
node->position = waypoint.position;
|
||||||
|
|||||||
Reference in New Issue
Block a user