fix(skills): shot_done names the projectile LOT, not the skill

The shooting gallery script compares shot_done with its super charge
cannon ball's LOT (6297 for GF; skill 249 launches it, skill 228 the
normal ball 1822). Also give the count of projectiles still in the air,
the script's cannonball group.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-11-27 21:25:24 -06:00
parent c1b9e1aec9
commit 6f014d0972
2 changed files with 6 additions and 1 deletions

View File

@@ -198,7 +198,8 @@ void SkillComponent::SyncPlayerProjectile(const LWOOBJID projectileId, RakNet::B
this->m_managedProjectiles.erase(this->m_managedProjectiles.begin() + index);
GameMessages::ActivityNotify notify;
notify.notification.Insert<int32_t>(u"shot_done", sync_entry.skillId);
// The projectile's LOT: sg_cannon.lua compares it with its super charge cannon ball (6297)
notify.notification.Insert<int32_t>(u"shot_done", sync_entry.lot);
m_Parent->OnActivityNotify(notify);
}

View File

@@ -166,6 +166,10 @@ public:
*/
void RegisterPlayerProjectile(LWOOBJID projectileId, BehaviorContext* context, const BehaviorBranchContext& branch, LOT lot);
// The projectiles it launched that have not come back yet (a shooting gallery's cannon balls in the air: its
// "cannonball" group)
size_t GetManagedProjectileCount() const { return m_managedProjectiles.size(); }
/**
* Wrapper for CalculateBehavior that mimics the call structure in scripts and helps reduce magic numbers
* @param skillId the skill to cast