mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-22 14:44:22 +00:00
chore: cleanup possession handling (#1984)
* feat: enhance possession mechanics with skill set integration and improved message handling * fix: restore SetPossessor in Mount() and scope IsRacing to vehicles SetPossessor was missing from Mount(), breaking direct possessions via PossessableComponent::OnUse which bypasses HandlePossession. IsRacing now only set/cleared when the mount has HavokVehiclePhysicsComponent, preventing non-vehicle possessions from incorrectly affecting the distance-driven statistic. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ PossessableComponent::PossessableComponent(Entity* parent, const int32_t compone
|
||||
m_AnimationFlag = static_cast<eAnimationFlags>(item.animationFlag);
|
||||
|
||||
// Get the possession Type from the CDClient
|
||||
auto query = CDClientDatabase::CreatePreppedStmt("SELECT possessionType, depossessOnHit FROM PossessableComponent WHERE id = ?;");
|
||||
auto query = CDClientDatabase::CreatePreppedStmt("SELECT possessionType, depossessOnHit, skillSet FROM PossessableComponent WHERE id = ?;");
|
||||
|
||||
query.bind(1, static_cast<int>(componentID));
|
||||
|
||||
@@ -20,6 +20,7 @@ PossessableComponent::PossessableComponent(Entity* parent, const int32_t compone
|
||||
if (!result.eof()) {
|
||||
m_PossessionType = static_cast<ePossessionType>(result.getIntField("possessionType", 1)); // Default to Attached Visible
|
||||
m_DepossessOnHit = static_cast<bool>(result.getIntField("depossessOnHit", 0));
|
||||
m_SkillSet = result.getIntField("skillSet", 0);
|
||||
} else {
|
||||
m_PossessionType = ePossessionType::ATTACHED_VISIBLE;
|
||||
m_DepossessOnHit = false;
|
||||
|
||||
Reference in New Issue
Block a user